Page 1 of 1

Threads Isses

Posted: Wed 12 Jan 2005 09:38
by cefe
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?

Greetings,
Cefe

Re: Threads Isses

Posted: Mon 17 Jan 2005 09:56
by Ikar
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.