Forum > Database

Zeos - TZquery, catch lost connection ?

<< < (2/2)

Propose to change the Forum. This is a second question except it's related to the topic. Is it? This forum is made for FPC-SQLDB not for Zeos DBO. Ask in the Zeos forum: And no i would not start from the premisse it's a bug (except its topic related). The exception says: You have a open LOB-Stream and you are closing the DataSet/Resultset. You can't access the stream after the dataset/resultset is closed. If you want that, make your own copy.

Thank you for your answer.
You're right, I think I might post this in zeos forum. Not sure it is a bug indeed, but this happened when I upgraded zeos. The issue was not present before.
(I try to assign a memorystream (Memorystream.loadfromstream(createblobstream(.... But I don't know how to close it because the stream is the result of the Createblobstream function...)
Best regards.

Sorry EgonHugeist, my bad

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- jmst := tmemorystream.Create;  // jmst.loadFromStream(CreateBlobStream(FieldByName('DATAS'), bmread));  (FieldByName('DATAS') as TBlobField).SaveToStream(jmst);jmst.Position:=0;usrimg := TPortableNetworkGraphic.Create;usrimg.LoadFromStream(jmst);;; I changed it using Field as Blobfield.savetostream, and now it works.
I won't use createblobstream anymore, but is ther a way to free it ??

I'll try the onLost connection soon, thanks for everything !
Best regards

So I tried the onLost, just showing a message dialog when the connection is dropped, but it didn't show anything and I don't know how it can be triggered...
Actually I tried to reboot firebird server while running the application, with some opened datasets, but the OnLost function is never executed. Am I doing something wrong ? Perhaps it doesn't work this way... When I currently try to update the dataset (while database server is rebooted), it raises a SQL error, that was formerly shown in the previous zeos versions.
Could you please tell me how to handle this function correctly ? 
Best regards.


[0] Message Index

[*] Previous page

Go to full version