Andrew Peacock Posted June 10, 2009 Posted June 10, 2009 (edited) Hi, I've been battling with a few "library used incorrectly" errors today. Here's a reproducible script: #include <sqlite.au3> #include <sqlite.dll.au3> Dim $hQuery, $aRow, $thisAccount _SQLite_Startup() _SQLite_Open("captchas.db3") $sql = 'SELECT * FROM `accounts` WHERE accounttype="email";' if _SQLite_Query(-1, $sql, $hQuery) <> $SQLITE_OK Then debug("Error Code: " & _SQLite_ErrCode() & ";Error Message: " & _SQLite_ErrMsg()) EndIf While _SQLite_FetchData ($hQuery, $aRow) = $SQLITE_OK $thisRow = $aRow[0] & "|" & $aRow[1] debug("Got row $thisRow$") WEnd _SQLite_QueryFinalize($hQuery) _SQLite_Close() _SQLite_Shutdown() exit; Func debug($text) ConsoleWrite($text & @crlf) EndFunc The response I get is a consistent Error Code: 21;Error Message: Library used incorrectly So, some background info: AutoIt: v3.3.0.0 SQlite.au3 says ; Include Version:1.78 (07.08.07) #include-once ; ------------------------------------------------------------------------------ ; ; AutoIt Version: 3.2.4.9 ; Language: English ; Description: Functions that assist access to an SQLite database. ; ; ------------------------------------------------------------------------------ So, not sure if that's compatible with Autoit 3.3.0.0 or not... SQLite.dll.au3 starts: ;Inline SQLite3.dll, Creation Time: 2008/12/17 19:16:18 #include-once Func __SQLite_Inline_Modified() Return "20081217191618"; 2008/12/17 19:16:18 EndFunc Func __SQLite_Inline_Version() Return "3.6.7" EndFunc SQlite version is 3.6.14.2 _SQLite_LibVersion=3.3.7 Anyone got any ideas? Regards, Andy Edited June 10, 2009 by Andrew Peacock
Andrew Peacock Posted June 10, 2009 Author Posted June 10, 2009 OK, Found a fix here:http://www.autoitscript.com/forum/index.php?showtopic=46826Tested, and it works.But that's a 2 year old post. And I'm not really sure what it's doing, so would that have any unwanted impact?Andy
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