Good Day experts in Delphi + Zeos.
I installed the Zeos Stable version 6.6.3 in my Delphi 7 and communication works perfectly in a common format and to use the so-called Zeus a DLL he also works fine until the moment they leave the program when it generates an exception code Run 216-time error at ????????, looked at all areas of the forum and found a solution that was to put the following lines in the event of Destroy LoadLibrary of each unit being mysql him:
destructor TZMySQLNativeLibraryLoader.Destroy;
begin
if (Loaded) and (@api_rec.mysql_server_end <> nil) then
api_rec.mysql_server_end;
inherited Destroy;
end;
Except that the units are already in version 6.6.3 with the code above, then tried to catch the libmysql of other distributions and nothing worked, does someone have to give a hint?
As I said Mysql5.0 use Zeos + + Delphi 7 and the problem only happens if you run Zeos a DLL, so it was seeing it seems that this is because when you call the Zeos it creates an instance of limysql executed for each call and when you close the libmysql the program is no longer in memory and overall generation of the error but how can resolve this situation?
PS: I tried to use the following LIBs:
* What is the distribution mysql (2076672 bytes)
* What comes with the package Zeos version 6.6.0 (1470464 bytes) that already in the 6.6.3 download had not the dlls (sourceforge)
* I tried to change the protocol in zconnection for mysql - mysql 5 - mysqld5.
* I tried to change the name of the DLL's to mysql50.dll mysql51.dll only mysql.
Thank you all!
RunTime Error 216 When Programming with DLL´s
Moderators: gto, EgonHugeist
RunTime Error 216 When Programming with DLL´s
You do not have the required permissions to view the files attached to this post.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
In my opinion this is a bug in libmysql. I had contact with the mysql developers about this already. Unfortunately no luck yet.
When you remove the code completely you should not have this problem anymore. Seems like the mysql_server_end code is just not working in the specific case we're having here.
Why keep the coding if it doesn't work? Well, it should work well in not dll related situations and the call is necessary when working with the mysql embedded server.
Mark
When you remove the code
Code: Select all
if (Loaded) and (@api_rec.mysql_server_end <> nil) then
api_rec.mysql_server_end;
Why keep the coding if it doesn't work? Well, it should work well in not dll related situations and the call is necessary when working with the mysql embedded server.
Mark