Re: Reading from the stream has failed
Posted by:
miha necak
Date: February 07, 2007 12:31PM
Hi,
I'm using MySQL 5.0.27 and .Net connector version 5.0.3 on Win XP Pro. My Connection String is: "server={0};user id={1}; password={2}; Port={3}; database={4}; pooling=true; encrypt=true; compress=true;"
When i use "compress=true", I get the next error on some result sets:
MySql.Data.MySqlClient.MySqlException was unhandled by user code
ErrorCode=-2147467259
Message="Reading from the stream has failed."
Source="MySql.Data"
StackTrace:
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at System.Data.ProviderBase.DataReaderContainer.NextResult()
at System.Data.Common.DataAdapter.FillNextResult(DataReaderContainer dataReader)
at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(Int32 startRecord, Int32 maxRecords, DataTable[] dataTables)
at AppTest.AppRead.WrkRead_DoWork(Object sender, DoWorkEventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\AppTest\AppTest\AppRead.vb:line 173
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
Sice using compression reduces network load by a substancial amount, i would very much like to continue using it. Any pointers in the direction of removing the error would be usefull. Thank you for your help in advance!
Miha Necak
Edited 2 time(s). Last edit at 02/12/2007 05:40AM by miha necak.