Hi Could not find the sqlite3_progress_handler in the AutoIt Forum. SQLITE link is here https://www.sqlite.org/c3ref/progress_handler.html (sorry, LINK insert not working) I wrote the code below based on examples from the SQLITE.AU3 include. I do not understand the possible errors. Also, I am not familiar with the the "C" syntax. Comments and improvements are greatly appreciated.
Func _SQLite_Progress($hDB = -1, $iTimer = 1000,$sCallback = "_cb",$Param = 1)
If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE)
If $iTimer = Default Then $iTimer = 1000
If $sCallback = Default Then $sCallback = "_cb"
If $Param = Default Then $Param = 1
Local $avRval = DllCall($__g_hDll_SQLite, "int:cdecl", "sqlite3_progress_handler", _
"ptr", $hDB, _ ; D An open database connection
"int", $iTimer, _ ; N the number of virtual machine instructions to evaluate between successive callbacks
"int", $sCallback, _ ; X user defined callback function
"ptr", $Param) ; P only parameter passed to callback X
If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error
If $avRval[0] <> $SQLITE_OK Then SetError(-1)
Return $avRval[0]
EndFunc ;==>_SQLite_SetTimeout