Commands out of sync

Commands out of sync

Postby yazid » Sun 09 Jan 2005 11:42

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

Re: Commands out of sync

Postby 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.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby 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
Guest
 

Postby 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.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby 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.
Guest
 

Postby 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.
Serious
 

Please clear the FetchAll concept with a sample

Postby 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
nuntio2000
 
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

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

I've sent private email with the code..

Postby 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.
nuntio2000
 
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

Postby Serious » Tue 01 Mar 2005 14:55

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

Postby nuntio2000 » Tue 01 Mar 2005 16:21

No BLOB field.
Please i'm online nuntio2000@hotmail.com
nuntio2000
 
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

Postby 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.
Serious
 


Return to dotConnect for MySQL