SQLite Forum

Tcl interface : pb with "rollback_hook" method
Login
Thank for your reply. Sorry to be late in my response (its 9.00 AM here in Europe).
I am very happy with SQLite and its Tcl interface, wich works great and the doc is consise and very clear.
However the problem I enconter here is strange to me.
The asumptions, I am aware of, are :

1) the script is processed in the order as the written text (here I think this assumption is true)

2) the callback invoked by SQLite + Tcl is processed after the result code of the last SQL statement is stored somewhere internaly by SQLite (I con't verify this)

3) the "rollback_hook" method works as written in the doc

I can't point where in the doc is contained that the error code has any validity at all during hook processing.
My sole source of information is the doc of Tcl interface wich says :
"error code" method : "This method returns the numeric error code that resulted from the most recent SQLite operation."
"rollback_hook" method : "This method registers a callback routine that is invoked just before SQLite tries to do a rollback. The script argument is run without change."

I am awere that the problem may be in Tcl interpreter behaviour and I have posted the same report on Tcl mailing list.