Jump to content

SQLite: Library Used Incorrectly error

Recommended Posts


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


$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())
While _SQLite_FetchData ($hQuery, $aRow) = $SQLITE_OK
    $thisRow = $aRow[0] & "|" & $aRow[1]
    debug("Got row $thisRow$")

Func debug($text)
    ConsoleWrite($text & @crlf)

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)

; ------------------------------------------------------------------------------
; AutoIt Version:
; Language:    English
; Description:  Functions that assist access to an SQLite database.
; ------------------------------------------------------------------------------

So, not sure if that's compatible with Autoit or not...

SQLite.dll.au3 starts:

;Inline SQLite3.dll, Creation Time: 2008/12/17 19:16:18
Func __SQLite_Inline_Modified()
    Return "20081217191618"; 2008/12/17 19:16:18
Func __SQLite_Inline_Version()
    Return "3.6.7"

SQlite version is


Anyone got any ideas?



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

  • Recently Browsing   0 members

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