AlecSadler Posted July 23, 2016 Share Posted July 23, 2016 Hello I am working on a database program to help keep track of drug inventory in a doctors office. Sqlite seems to be the best method for storing and retreiving data but for some weird reason it just plain wont work. My autoit version is 3.3.14.2 Here is my source expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SQLite.au3> #include <SQLite.dll.au3> _SQLite_Startup() ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF) Global $Db = _SQLite_Open(@ScriptDir&'\drugbase.db') _SQLite_Exec($db, "Create table drugbase (lot,indate,expdate,name);") #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("DrugBase", 615, 290, 192, 124) $Group1 = GUICtrlCreateGroup("Group1", 8, 0, 185, 81) $Label1 = GUICtrlCreateLabel("LOGO", 72, 32, 34, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Input1 = GUICtrlCreateInput("Search Box", 200, 16, 401, 21) $Combo1 = GUICtrlCreateCombo("Date", 200, 48, 401, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $List1 = GUICtrlCreateList("", 8, 88, 593, 175) $Label2 = GUICtrlCreateLabel("Add New Drug Lot", 16, 272, 92, 17) GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label3 = GUICtrlCreateLabel(" - ", 120, 264, 24, 25) GUICtrlSetFont(-1, 17, 400, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("Delete Row", 152, 272, 60, 17) GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label5 = GUICtrlCreateLabel(" - ", 220, 264, 24, 25) GUICtrlSetFont(-1, 17, 400, 0, "MS Sans Serif") $Label6 = GUICtrlCreateLabel("Edit", 256, 272, 22, 17) GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label7 = GUICtrlCreateLabel("Copyright Progressive Dynamics Global Limited Company 2013-2016", 280, 272, 325, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _SQLite_Close() _SQLite_Shutdown() Exit EndSwitch WEnd any help would be much appreciated. Link to comment Share on other sites More sharing options...
InunoTaishou Posted July 23, 2016 Share Posted July 23, 2016 What does it do? Does _SQLite_Startup error? Do you have the sqlite dll on your computer in one of the necessary folders? Link to comment Share on other sites More sharing options...
AlecSadler Posted July 23, 2016 Author Share Posted July 23, 2016 27 minutes ago, InunoTaishou said: What does it do? Does _SQLite_Startup error? Do you have the sqlite dll on your computer in one of the necessary folders? I'm including the dll in my code, see below. However the startup function return error "1" and the version check returns version "0" #include <SQLite.dll.au3> Link to comment Share on other sites More sharing options...
InunoTaishou Posted July 23, 2016 Share Posted July 23, 2016 That's not the actual dll, you need to download the sqlite.dll file and place it in a proper directory. https://www.autoitscript.com/autoit3/docs/libfunctions/_SQLite_Startup.htm Quote Remarks If #include <SQLite.dll.au3> is included the SQLite version is checked. The SQLite files can be downloaded from https://www.autoitscript.com/autoit3/pkgmgr/sqlite/SQLite3_version.zip that can be stored in @ScriptDir, @SystemDir, @WindowsDir, or @WorkingDir. Link to comment Share on other sites More sharing options...
AlecSadler Posted July 23, 2016 Author Share Posted July 23, 2016 I did that. I get the exact same behavior.... Link to comment Share on other sites More sharing options...
AlecSadler Posted July 23, 2016 Author Share Posted July 23, 2016 nvm it's working now. thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now