c.haslam

_SQLite_Open() sets @extended to 21

6 posts in this topic

#1 ·  Posted

#RequireAdmin
#include <sqlite.au3>
#include <SQLite.dll.au3>
Local $aResult, $iRows, $iColumns, $iRval

_SQLite_Startup()
Local $hsq = _SQLite_Open(@ScriptDir&'\ar.db',$SQLITE_READONLY)
MsgBox(0,'',@error&'  '&@extended&'  '&_SQLite_ErrCode() & @CRLF & "Error Message: " & _SQLite_ErrMsg())
$iRval = _SQLite_GetTable(-1, "schema sqlite_master", $aResult, $iRows, $iColumns)

_SQLite_Close($hsq)
_SQLite_Shutdown()

Why am I getting @extended 21, Library used incorrectly?

SciTe console shows:

@@ Debug(257) : __SQLite_Download_SQLite3File : $URL = http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/sqlite3.dll
    $sTempfile = C:\Users\Chris\AppData\Local\Temp\~qqhdtom.dll
>Error: 13


I am running AutoIt 3.3.14.0

...chris


...chris

Share this post


Link to post
Share on other sites



#2 ·  Posted

Try it without this...#include <SQLite.dll.au3>


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

#3 ·  Posted

_SQLite_Startup() function no longer automatically downloads the SQLite DLL files from autoitscript.com. The url in the console gives a 404 error.

From AutoIt v3.3.14.2 you have to download the files manually from here and put the files in @ScriptDir, @SystemDir, @WindowsDir, or @WorkingDir.

You can put the file in other directories but must specify the file path. Read the latest help file for _SQLite_Startup

Share this post


Link to post
Share on other sites

#4 ·  Posted

Thank you both for the help.

I:

  • Updated to AutoIt 3.3.14.2
  • Removed #include <SQLite.db.au3>
  • Downloaded sqlite3.dll from the link you provided

but this script errored out as before:

#include <sqlite.au3>
Local $aResult, $iRows, $iColumns, $iRval

_SQLite_Startup()
Local $hsq = _SQLite_Open(@ScriptDir&'\ar.db',$SQLITE_READONLY)
MsgBox(0,'',@error&'  '&@extended&'  '&_SQLite_ErrCode() & @CRLF & "Error Message: " & _SQLite_ErrMsg())
$iRval = _SQLite_GetTable(-1, "schema sqlite_master", $aResult, $iRows, $iColumns)

_SQLite_Close($hsq)
_SQLite_Shutdown()

It ran OK when I removed $SQLITE_READONLY

I will report what appears to be an error to M Lipok (if no one has done so already)


...chris

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

c.haslam,

Apologies for not looking more closely.  $SQLITE_READONLY is a variable for return codes and is set by SQLite, hence your problem.

No need to notify Mlipok of anything as the doc is correct.

kylomas

Edited by kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

#6 ·  Posted

Thnak you for telling me. My error.


...chris

Share this post


Link to post
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