SQLiteForExcel icon indicating copy to clipboard operation
SQLiteForExcel copied to clipboard

64bit version crashes

Open KallunWillock opened this issue 11 months ago • 3 comments

I just tried running the demo routine, and it crashed Excel four out of four times. I stepped through the code, and it crashes on the operative line of the SQLite3BackupStep routine.

I believe this is a result of the sqlite3_backup_init API declaration, which appears to return a Long data type, which is then passed to the BackupStep routine as the backuphandle (LongPtr). I changed the sqlite3_backup_init API declaration to return a LongPtr instead (as below) and it no longer crashes.

Private Declare PtrSafe Function sqlite3_backup_init Lib "SQLite3" (ByVal hDbDest As LongPtr, ByVal zDestName As LongPtr, ByVal hDbSource As LongPtr, ByVal zSourceName As LongPtr) As LongPtr

KallunWillock avatar Jul 09 '23 12:07 KallunWillock

I thought I fixed it here last year. https://github.com/govert/SQLiteForExcel/commit/8f233e6350d2b2714f8a391a695b79b3446b9dfe Did I miss something?

govert avatar Jul 09 '23 20:07 govert

I'm guessing the change wasn't made to the code in the XLSM file (Distribution Folder)?

KallunWillock avatar Jul 10 '23 18:07 KallunWillock

I just checked. It looks like you updated the BAS file 4 years ago but the demonstration workbooks were last updated 7 years ago.

KallunWillock avatar Jul 12 '23 02:07 KallunWillock