Jump to content

[Solved] SQLite - SQLite3.dll Can't be Loaded


Recommended Posts

Hey,

I have a script that uses SQLite. It worked without a hiccup on my W7 system.

However, last week I bought a new machine, installed W10 and autoit, and now I'm getting an error during _SQLite_Startup.

Can anyone advise on how to find what's wrong? Tried checking $__g_hPrintCallback_SQLite but that returns nothing.

 

Tried downloading the latest version of the dll from the link in the function page and I also replaced the default SQLite.dll.au3 that came with AutoIt with the one that came with the latest SQLite version zip.

 

Relevant parts of my script:

#include <SQLite.au3>
#include <SQLite.dll.au3>

_SQLite_Startup(@ScriptDir & "\Config\sqlite3_x64.dll", False, 1)
If @error Then
    MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded! - " & $__g_hPrintCallback_SQLite & @CRLF & @CRLF & "Exiting application / Zavolej Honzovi")
    Exit -1
EndIf

 

Thanks

S.

Edited by Seminko
Link to comment
Share on other sites

You are getting the error due to running 32-bit AutoIt.  It needs to be run in as 64-bit.  Add the following to the top of your script, and it will work, at least for me it does.    

#AutoIt3Wrapper_UseX64=Y ;(Y/N) Use AutoIt3_x64 or Aut2Exe_x64. Default=N

#include <SQLite.au3>
#include <SQLite.dll.au3>

_SQLite_Startup(@ScriptDir & "\Config\sqlite3_x64.dll", False, 1)
If @error Then
    MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded! - " & $__g_hPrintCallback_SQLite & @CRLF & @CRLF & "Exiting application / Zavolej Honzovi")
    Exit -1
EndIf

 

Adam

 

Link to comment
Share on other sites

5 minutes ago, AdamUL said:

You are getting the error due to running 32-bit AutoIt.  It needs to be run in as 64-bit.  Add the following to the top of your script, and it will work, at least for me it does.    

#AutoIt3Wrapper_UseX64=Y ;(Y/N) Use AutoIt3_x64 or Aut2Exe_x64. Default=N

#include <SQLite.au3>
#include <SQLite.dll.au3>

_SQLite_Startup(@ScriptDir & "\Config\sqlite3_x64.dll", False, 1)
If @error Then
    MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded! - " & $__g_hPrintCallback_SQLite & @CRLF & @CRLF & "Exiting application / Zavolej Honzovi")
    Exit -1
EndIf

Adam

It did work! Thanks for that!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...