Thanks Ralf. No, originally I didn't get any error messages with the original code. It just behaved as if nothing was wrong except didn't save the recod (as expected). However the new code for function sqlite3_exec_with_callback is generating a compile error. C_int, undeclared identifier at the line indicated. (also, does sqlite3_exec_with_callback16 need modification as well as sqlite3_exec_with_callback ?) Howard function sqlite3_exec_with_callback( const ADBHandle: sqlite3_ptr; const ASQL: Utf8String; const ACallback: TDISQLite3_Callback_{$IFDEF SUPPORTS_DEFAULTPARAMS} = nil{$ENDIF}; const AUserData: Pointer{$IFDEF SUPPORTS_DEFAULTPARAMS} = nil{$ENDIF}): Integer; var CallbackResult: Boolean; SqlStart, SqlTail: PUtf8Char; SqlLength: C_int; <------------------------------------------------ here Stmt: sqlite3_stmt_ptr; begin