Forum > Databases
Firebird UDF, Error ESQLDatabaseError : 08003 at the second call in the proc
newbie_fpc:
Hi!
I would like to ask some help. In advance, I'm sorry for my english grammar mistakes. So I wrote an UDf for firebird and it is okay at the first call, but at the next call an exception occurs in tha DLL when query.open() or conn.Connected := true or conn.open(), so a connect happens. I have lines for logging and i see that the first call attempt doesnt have any problem, executed successfully, but the next ones.
The exception:
ESQLDatabaseError : 08003 - TIBConnection : DoInternalConnect :
-connection shutdown
newbie_fpc:
I also have tried other Connection classes (TSQLConnector,TIBConnection,TSQLConnection), and each one caused the same. It seems to me, that the problem is with the connection, because if i commented the query.open()/conn.Connected:=true/conn.Open() lines then there is no problem in the UDF. So maybe the connection in the first attempt gets stuck somehow?
newbie_fpc:
I forgot these "details":
-Firebird 2.5.8 64bit
-Lazarus 2.0.12
-FPC 3.2.0
-DLL compiled 64bit
korba812:
Probably your function in the UDF library triggers an exception that cannot be handled by Firebird, which results in the database connection being dropped.
Wrap your function in try..except block and log exception details:
--- 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";}};} ---function udf(param: integer): integer;begin try ...your code except on e: exception do ... save exception information to file end;end;
newbie_fpc:
Thank you for your answer.
I've already tried that you suggest and this was the logged exception:
ESQLDatabaseError : 08003 - TIBConnection : DoInternalConnect :
-connection shutdown
Navigation
[0] Message Index
[#] Next page