Jump to content

SQLite3.dll Can't be Loaded!


ivan
 Share

Recommended Posts

After being away from autoit for a while, I've picked up an old project again, but run into trouble when trying to use sqlite.dll

On running _SQLite_Startup(), I get @error=1 (Call Prevented by SafeMode). It does not run with _SQLite_SafeMode(False) or _SQLite_SafeMode(True)

I thought SQLite3.dll could have been overwritten in @SystemDir by a 3rd party app (thunderbird or other), and I replaced it with the file in http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3.dll in an attempt to fix the issue, but I think I could have made things worse. I did unblock the dll btw.

Any thoughts on how I may fix this? I'm running:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "F:db.au3" /UserParams

+>02:16:43 Starting AutoIt3Wrapper v.2.1.0.8 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64)

>Running AU3Check (1.54.22.0) from:C:Program Files (x86)AutoIt3

+>02:16:43 AU3Check ended.rc:0

>Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3_x64.exe

Thanks, in advance for any help you may provide.

Regards,

Ivan

Edited by ivan
Link to comment
Share on other sites

Perhaps this is a fix, I downloaded _SQLite_LibVersion=3.7.13 from the sqlite site and copied the file to the systemdir folder. I did notice sqlite is slow though, but at least it works. http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3.dll doesn't on my machine.

Regards,

Ivan

Link to comment
Share on other sites

If you compile for x64 then you need to run the x64 version of the DLL http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3_x64.dll. One can't mix x86 and x64 modules in the same process.

Now if you say the version downloaded from the SQLite website works then you must have changed to an x86 build: http://www.sqlite.org/sqlite-dll-win32-x86-3071501.zip is x86 as its name indicates.

You also say SQLite is slow but you don't give us a clue about what your code is, what you expect and how the result fail to meet your expectations. We would be happy to help but you need to be more explicit. Post code!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

ivan,

I ran into the same problem a while back and was advised that AutoIt now attempts to get the correct driver from the cloud unless you direct it to use a local driver. The links the others have given you are where to get the current driver. I would recommend you drop it into the install directory or the system32 folder and direct AutoIt to look locally.

EDIT:

Edited by Colyn1337
Link to comment
Share on other sites

If you compile for x64 then you need to run the x64 version of the DLL http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3_x64.dll. One can't mix x86 and x64 modules in the same process.

Now if you say the version downloaded from the SQLite website works then you must have changed to an x86 build: http://www.sqlite.org/sqlite-dll-win32-x86-3071501.zip is x86 as its name indicates.

You also say SQLite is slow but you don't give us a clue about what your code is, what you expect and how the result fail to meet your expectations. We would be happy to help but you need to be more explicit. Post code!

Thank you for the tips. I am quite aware of the x86 and x64 files. As for the slowness, it was the result of an embarrassing badly constructed query.

Regards,

Ivan.

Link to comment
Share on other sites

ivan,

I ran into the same problem a while back and was advised that AutoIt now attempts to get the correct driver from the cloud unless you direct it to use a local driver. The links the others have given you are where to get the current driver. I would recommend you drop it into the install directory or the system32 folder and direct AutoIt to look locally.

EDIT:

Cool, thanks Carolyn. You're right, _SQLite_Startup downloads the file if necessary by calling __SQLite_Download_SQLite3Dll which looks for

http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3.dll

or

http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3_x64.dll

I ran your script and observed no changes, but it did help me figure out what's going on. Windows blocks the dll file in the System32 directory each time I copy the file.

Regards,

Ivan

Link to comment
Share on other sites

Windows blocks the dll file in the System32 directory each time I copy the file.

Run as admin should fix that ;) Tho, I just have it look in the script install directory for the driver and ensure an included driver unpacks there. It's easier to control.

Edited by Colyn1337
Link to comment
Share on other sites

Run as admin should fix that ;) Tho, I just have it look in the script install directory for the driver and ensure an included driver unpacks there. It's easier to control.

Thanks, I copied the file to a child directory in the script path and that was remedied.
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...