Page 1 of 1

Commands out of sync

Posted: Sun 09 Jan 2005 11:42
by yazid
I have frequentely this error message . What do I have to do ?

Re: Commands out of sync

Posted: Mon 10 Jan 2005 12:19
by Oleg
This error happens if you have open DataReader and execute another command with the same connection. Mare sure that you always close DataReader, or open DataReader from the command with FetchAll = true.

Posted: Sat 22 Jan 2005 16:05
by Guest
Hi, I too am getting this error, however my app doesn't any DataReaders - All it uses is 'Fill' (for which I obviously don't manually open and close the tables) and 'ExecuteNonQuery' (where I always explicitly open and close the tables). When I switch off connection pooling (thru the connection object) the problem appears to disappear. Does anyone have any idea what might be causing this problem? I'm converting the application from OleDb to the CoreLab components and under OleDb the app runs fine.

I'm currently still using the trial version of v2.7 with VS 2003, C#, XP and MySQL v4.1.

Thanks

Posted: Mon 24 Jan 2005 14:32
by Oleg
This problem can happen if you use the same connection from different threads. Please advise if this error raises the first or may be follow another one.

Posted: Fri 25 Feb 2005 07:19
by Guest
Oleg wrote:This problem can happen if you use the same connection from different threads. Please advise if this error raises the first or may be follow another one.
Big problem, we cannot just simply open and close all many connections as it degrade the performance. We might need to have multiple sql in one single form to load data. This issue does not happen in version 2.0. only 2.7 I facing this problem. In ver 2.0, I faced another set of problem of max connection pool.

Posted: Mon 28 Feb 2005 12:44
by Serious
If you use pooling, server connections doesn't close when you call MySqlConnection.Close(). Connection pool was created to increase perfomance of applications like yours (appications which often open and close connections).
Implementation of Connection pool in MySQLDirect .NET v2.0 is a not as good as in the last version of MySQLDirect .NET Data Provider. Please use the newest versions of the product.
To use connection pooling set "pooling=true;" option in your connection string.

Please clear the FetchAll concept with a sample

Posted: Mon 28 Feb 2005 23:18
by nuntio2000
Hi Oleg,
i have this problem after the first execution of datareader:
"Net packets out of order: received[51], expected[1]"

Please help me.... :cry:
Nunzio

Posted: Tue 01 Mar 2005 13:39
by Serious
Please describe in detail your problem.
If it is possible send small test project to reproduce the problem; it is desirable to use 'test' schema objects otherwise include definition of your own database objects; don't use third party components. Please specify size of your database objects (1Kb, 1Mb, 16Mb, 100Mb...)

I've sent private email with the code..

Posted: Tue 01 Mar 2005 14:04
by nuntio2000
The table size is about 80MB and the data retraived are more than 30.000 rows for each query.

Posted: Tue 01 Mar 2005 14:55
by Serious
Do you have BLOB data in your tables (specify max size )?

Posted: Tue 01 Mar 2005 16:21
by nuntio2000
No BLOB field.
Please i'm online [email protected]

Posted: Wed 02 Mar 2005 08:25
by Serious
Please send us a piece of your code.
Specify MySQLDirect .NET and MySQL Server versions, include definition of your own database objects.
Please send us your answers to the support e-mail.