Commands out of sync

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Locked
yazid

Commands out of sync

Post by yazid » Sun 09 Jan 2005 11:42

I have frequentely this error message . What do I have to do ?

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Re: Commands out of sync

Post by Oleg » Mon 10 Jan 2005 12:19

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.

Guest

Post by Guest » Sat 22 Jan 2005 16:05

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

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by Oleg » Mon 24 Jan 2005 14:32

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.

Guest

Post by Guest » Fri 25 Feb 2005 07:19

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.

Serious

Post by Serious » Mon 28 Feb 2005 12:44

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.

nuntio2000
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

Please clear the FetchAll concept with a sample

Post by nuntio2000 » Mon 28 Feb 2005 23:18

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

Serious

Post by Serious » Tue 01 Mar 2005 13:39

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...)

nuntio2000
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

I've sent private email with the code..

Post by nuntio2000 » Tue 01 Mar 2005 14:04

The table size is about 80MB and the data retraived are more than 30.000 rows for each query.

Serious

Post by Serious » Tue 01 Mar 2005 14:55

Do you have BLOB data in your tables (specify max size )?

nuntio2000
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

Post by nuntio2000 » Tue 01 Mar 2005 16:21

No BLOB field.
Please i'm online nuntio2000@hotmail.com

Serious

Post by Serious » Wed 02 Mar 2005 08:25

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.

Locked