Hi,
I to access a DB every few seconds so I thought to take the file DB "mirror"/copy it to a memory DB and check the memory DB every few seconds. sqlitebackup.au3 seems an easy way to do this - to make the memory copy. But I must be missing something when I try a simple test because I didn't get anything from a select statement on the memory DB. But when I substitute the disk DB with the same code it works. I tried:
...
...
#include <SQLite.au3>
#include <SQLite.dll.au3>
#include <sqlitebackup.au3>
$sSQliteDll = _SQLite_Startup()
$sDbName = "C:\sqlite\relays.db"
$hDskDb = _SQLite_Open($sDbName)
Local $aRow
Local $hmemDb = _SQLite_Backup($hDskDb, ':memory:', Default, Default, Default, Default, Default)
Local $d = _SQLite_Exec($hmemDb, "Select * From sched", "_cb") ; this does not work
; Local $d = _SQLite_Exec($hDskDb, "Select * From sched", "_cb") ; this works
Func _cb($aRow)
For $s In $aRow
ConsoleWrite($s & @TAB)
Next
ConsoleWrite(@CRLF)
EndFunc ;==>_cb
; ...
; ...
_SQLite_Close()
_SQLite_Shutdown()
I guess my questions is - What am I doing wrong? Thanks.