SQLite Forum

Tcl interface : pb with "rollback_hook" method
Login
SQLite 3.35.5
Tcl 8.6.11

I want to monitor the error code when a transaction is rolled back after a SQL statement fails.

sqlite3 db1 filedb

proc callBack {} {
  puts [db1 errorcode]
}

db1 rollback_hook callBack

db1 transaction {
   db1 eval "UPDATE table SET ..."   -> statement fails
}


The "errorcode" method (executed in callBack proc) returns always 0 (SQLITE_OK)
instead of the error code of the statement.

I don't understand what is hapenning, I need some help please.

Thanks