Page 1 of 1

MySQL server gone away after call to dll

Posted: 30.10.2012, 12:39
by hstijnen
Hi,

I've a program with connection to some Mysql server. This program calls a stand alone dll. In the dll again a connection is created to the same Mysql server, and afterwards deleted. The dll gives the correct result.

After return in the calling program, when for the first time there is some call to the server, I get the error "MySQL server has gone away".

What can be at hand? Is the architectur with a dll that connects to the same server not allowed? Has anyone a suggestion what to do?

Regards, Henk

Posted: 30.10.2012, 16:31
by EgonHugeist
hstijnen,

Hmm that happens if the MySQL connect handle was released. Which means the dll connection disposes the same handle the calling applikation uses too!?

You use two different ZConnection.. What happens if one of them contains TZConnection.LibraryLocation := 'libmysql.dll? Here i force Zeos to clone the PlainDriver, which normaly has no dependencies to the connection handles. Are you sure you really have two ZConnection?

Posted: 30.10.2012, 16:44
by hstijnen
I'm very sure. I have two different cbproj's.

For this moment I've solved it by copying the code I need into my prog. and no more call to dll