Threads Isses

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply

Threads Isses

Post by cefe » Wed 12 Jan 2005 09:38

I have found problems when using a same SQLConnection object in different threads, having each thread its own SQLQuery object in C++ Builder 6:

Code: Select all

Exception: Access violation at address 053C8A7D in module 'libmysql.dll'. Read of address 00000003
Exception: Lost connection to MySQL server during query
This does not happen if each thread has its own SQLConnection.
Exists some well-known problem? There is some solution?


Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: Threads Isses

Post by Ikar » Mon 17 Jan 2005 09:56

You are right, it is a known problem. Your solution also is correct, each thread must use a separate connection. So a single connection must be used only by a single thread at the same time.

Post Reply