Jump to content

SQLite: Library Used Incorrectly error


Recommended Posts

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 by Andrew Peacock
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...