Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

FileOpenDialog and SQLite Error

$
0
0

Hi Guys,

 

first of all i wanna thank you for this greate forum. I am a autoit newbie and leaned allready a lot (i belive) by reading this forum.

 

Now i got to a strange problem. 

If i open a FileOpenDialoge befor using my sqlite connection. SQL will not find the DB table. (See first script)

 

But if i comment the FileDialog it works fine and i get the result of my DB Table.

 

Where is the mistake?

 

Thx for your help.

 
AutoIt         
#include <Array.au3> #include <SQLite.au3> #include <SQLite.dll.au3> local $sMessage local $sFileOpenDialog = FileOpenDialog($sMessage, @WindowsDir & "\" , "All (*.*)") global $sSQliteDll = _SQLite_Startup("SQLite3.dll") If @error Then MsgBox($MB_SYSTEMMODAL, "SQLite Error", "SQLite3.dll Can't be Loaded!" & @CRLF & @CRLF & _ "Not FOUND in @SystemDir, @WindowsDir, @ScriptDir, @WorkingDir or from www.autoitscript.com") Exit -1  EndIf local $DB_Main_MainDB = _SQLite_Open("Main_DB.db3") Local $hQuery,$aRow local $sql = "SELECT * FROM testscript"  _SQLite_Query($DB_Main_MainDB, $sql,$hQuery) dim $test While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK     $test = $arow[0] wEnd msgbox (0,0,$test)
AutoIt         
#include <Array.au3> #include <SQLite.au3> #include <SQLite.dll.au3> local $sMessage ;-------------------------------------------------------------------------------------------- ;local $sFileOpenDialog = FileOpenDialog($sMessage, @WindowsDir & "\" , "All (*.*)") ;----------------------------------------------------------------------------------------- global $sSQliteDll = _SQLite_Startup("SQLite3.dll") If @error Then     MsgBox($MB_SYSTEMMODAL, "SQLite Error", "SQLite3.dll Can't be Loaded!" & @CRLF & @CRLF & _             "Not FOUND in @SystemDir, @WindowsDir, @ScriptDir, @WorkingDir or from www.autoitscript.com")     Exit -1  EndIf local $DB_Main_MainDB = _SQLite_Open("Main_DB.db3") Local $hQuery,$aRow local $sql = "SELECT * FROM testscript"  _SQLite_Query($DB_Main_MainDB, $sql,$hQuery) dim $test While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK     $test = $arow[0] wEnd msgbox (0,0,$test)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>