Se me ocurre que puedes comprobar el resultado de la funcion _SQLite_Open, ya que segun el codigo de SQLite.au3 si hay un error devuelve 0.
Asi en vez de
Prueba con
Pero como bien dices, es muy extraño.¿has comprobado la libreria, por si no es correcta?
Este el es codigo de la que yo tengo (solo la funcion OPEN).
Código: Seleccionar todo
; #FUNCTION# ====================================================================================================================
; Author ........: piccaso (Fida Florian)
; Modified.......: jchd, jpm
; ===============================================================================================================================
Func _SQLite_Open($sDatabase_Filename = Default, $iAccessMode = Default, $iEncoding = Default)
If Not $g_hDll_SQLite Then Return SetError(3, $SQLITE_MISUSE, 0)
If $sDatabase_Filename = Default Or Not IsString($sDatabase_Filename) Then $sDatabase_Filename = ":memory:"
Local $tFilename = __SQLite_StringToUtf8Struct($sDatabase_Filename)
If @error Then Return SetError(2, @error, 0)
If $iAccessMode = Default Then $iAccessMode = BitOR($SQLITE_OPEN_READWRITE, $SQLITE_OPEN_CREATE)
Local $OldBase = FileExists($sDatabase_Filename) ; encoding cannot be changed if base already exists
If $iEncoding = Default Then
$iEncoding = $SQLITE_ENCODING_UTF8
EndIf
Local $avRval = DllCall($g_hDll_SQLite, "int:cdecl", "sqlite3_open_v2", "struct*", $tFilename, _ ; UTF-8 Database filename
"ptr*", 0, _ ; OUT: SQLite db handle
"int", $iAccessMode, _ ; database access mode
"ptr", 0)
If @error Then Return SetError(1, @error, 0) ; DllCall error
If $avRval[0] <> $SQLITE_OK Then
__SQLite_ReportError($avRval[2], "_SQLite_Open")
_SQLite_Close($avRval[2])
Return SetError(-1, $avRval[0], 0)
EndIf
$g_hDB_SQLite = $avRval[2]
__SQLite_hAdd($__ghDBs_SQLite, $avRval[2])
If Not $OldBase Then
Local $encoding[3] = ["8", "16", "16be"]
_SQLite_Exec($avRval[2], 'PRAGMA encoding="UTF-' & $encoding[$iEncoding] & '";')
EndIf
Return SetExtended($avRval[0], $avRval[2])
EndFunc ;==>_SQLite_Open
A ver si descubres el fallo!!