Application does not close !

Forum related to version 6.1.5 of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
User avatar
open_devel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.01.2006, 16:42

Application does not close !

Post by open_devel »

I use mysql 3.23.58, windowsxp sp2, c++builder6 sp4. I need to make some changes over my finished application. There was no problem when i finished it but now i have a serious problem. Even if i close the application while working with IDE, the window closes and (unfortunately) debugger freezes. When i run it standalone, i close it and main window dissapers. But this time i launch task manager and i see that it is still running!

I designed a simple project and saw that when ZConnection is connects to the database, the problem occurs. Although I close it using disconnect method, it is useless...

I will be happy for your help :wink:
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

IIRC this has been mentioned before somewhere on this (or the previous) forum. It seems to be a MySql thing relating to the client dll. It might be worth having a look on the MySql forums for a fix.

Ben
User avatar
open_devel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.01.2006, 16:42

same problem with firebird 1.5

Post by open_devel »

I test it using Firebird 1.5 but i face same problem again :(
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Try to add a button with the event ZConnection1.Disconnect

Then try the following
- Press the button and then close the application. This way you check if the DLL is unloaded OK. The problem remains?
- Modify the source to start without connecting. Start the application and then turni it off. This way you can detemine if the bug is related to DLL loading/unloading (the DLL is callend upon .Connect is fired).
User avatar
open_devel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.01.2006, 16:42

Post by open_devel »

I did all of them. I start the app without connecting. There's no problem when i close it without connecting. I used command buttons to start and stop the connection. It connects and disconnects without any problem. But if I start the connection, my app does not terminate even if i close the connection!
martinalex
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 21.12.2005, 16:54

Application does not close !

Post by martinalex »

I have a similar error with Zeos sometimes. I use D7, Zeos 6.5.1 and Firebird 1.5.2.

When I close my application I have an exception at disconnect. The exception happens in procedure TZConnection.Disconnect (ZConnection.pas);
I could trace the error down a bit.

In TZConnection.CloseAllDataSets
the error occurs for the last dataset to be closed. The except ignore statement does not work, because the error is raised below.

try
Current.Close;
except
// Ignore.
end;

In ZDbcInterbase6.pas, TZInterbase6Connection.Close
the error happens in the following statement
FPlainDriver.isc_detach_database(@FStatusVector, @FHandle);

there is not much below, so I think that it's a dll error.
The error does never happen when the program only reads the database.

So far I don't know a workaround.

The error message is:
Exception Fehler:
SQL Error: invalid statement handle. Error Code: -901. Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements
Address: 561547
The operation completed successfully
User avatar
open_devel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.01.2006, 16:42

Post by open_devel »

I designed a small application based on Firebird 1.5.2 using ZEOS DBO 6.1.5. Same problem goes again. It seems to be closed but I can see that the application doesnt close from task manager. I tried again by installing ZEOS DBO 6.5.1 bu that was useless ! Finally I reinstalled windows xp sp2 without installing any application. And I saw that there is no problem. Maybe we face these problems because of a replaced DLL. But i tried different connectivity utilities and faced no problem :(
DrMule
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 17.03.2006, 14:04

Error 901

Post by DrMule »

I am getting Error 901, Delphi 7, embedded Firebird 1.5, traced to this level
(hope this helps):
procedure TZInterbase6Connection.Close;
begin
.
.
.
if FHandle <> nil then
begin
FPlainDriver.isc_detach_database(@FStatusVector, @FHandle);
FHandle := nil;
CheckInterbase6Error(FPlainDriver, FStatusVector, lcDisconnect);
end;
Post Reply