Page 1 of 1

MySQLMonitor seems to ignore all TMyConnections after the first

Posted: Mon 13 Aug 2007 01:40
by QBD Dev
I am in the process of dividing some tasks into multiple threads. Each thread is creating its own TMyConnection and TMySQLMonitor. The idea is that each thread would maintain a separate log with TMySQLMonitor contributing the SQL that gets run.

However, all the SQL statements go the log of the first thread that is started. Is there a way to get the code to send the messages from each thread to the appropriate monitor?

The version, according to the connection editor, is 4.40.0.19.

In the meantime I have a work-around using the GetCurrentThreadId function.

Regards,

Mark Patterson
QBD

Posted: Tue 14 Aug 2007 06:26
by Antaeus
This is a designed behaviour of the TMySQLMonitor component. Actually only one internal engine of this component is created within an application even if you create more than one TMySQLMonitor component. There is no possibility to associate TMySQLMonitor with TMyConnection. The approach you have chosen looks like an appropriate solution.