UniDAC + MySQL - Net packets out of order
Posted: Wed 11 Jul 2012 20:17
Hi. I'm experiencing odd behavior when using UniDAC 4.14 under Delphi XE and MySQL provider. I'm creating the UniConnection programmatically with:
The connection works ok and all goes well when I insert data in the main thread. The problem appears when I try to insert data into any table using a separate thread. Then I start getting messages like:
This does not happen when I use SQLite as provider. I have MySQL 5.5.11 installed. Any solution?
Code: Select all
core_knowledge_db:= TUniConnection.Create(nil);
core_knowledge_db.Database:= knowledge_db_name;
core_knowledge_db.LoginPrompt:= False;
core_knowledge_db.ProviderName:= 'MySQL';
core_knowledge_db.Server:= server_knowledge;
core_knowledge_db.Username:= username_knowledge;
core_knowledge_db.Password:= password_knowledge;
core_knowledge_db.SpecificOptions.Values['Direct']:= 'true';//Direct Mode
//events
core_knowledge_db.OnError:= EventHandler.OnConnectionError;
core_knowledge_db.OnConnectionLost:= EventHandler.OnConnectionLost;
try
core_knowledge_db.Connect;
(..)Code: Select all
ReceiveHeader: Net packets out of order: received[252], expected[1]'.