I have a Windows Service application that is heavily multi-threaded.
There are many threads which each insert new rows into the same table. Each thread uses a unique TMyConnection and TMyQuery component. The connection is kept open. Every few minutes each thread inserts a bunch of new rows into the table using an SQL INSERT command. The primary key for the table is an auto-increment BIGINT.
The problem is that every few thousand records I get a database error (in the production environment) when executing the INSERT command.
If I reduce the environment to a single thread, it works fine. Also, when this was using the Borland BDE it worked fine.
Help!
multi-threading and MyDAC
Please simplify your application as much as possible so that the problem is reproduced and send it to me at evgeniyD*crlab*com to demonstrate it. Include script to create table(s).
Also supply us the following information:
- exact version of Delphi, C++ Builder or Kylix;
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.
Also supply us the following information:
- exact version of Delphi, C++ Builder or Kylix;
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.