Sign in to follow this  
Followers 0
mostyr

SQLite connection to s3db file

3 posts in this topic

#1 ·  Posted (edited)

Hello,

please can you help me with sqlite... specifically with connection to *.s3db file.

I have an application which logs some operations to *.s3db file.
I would like to read and process data from this database file in some period.

My first step was to find some sqlite manager where I can see structure of database.
I found app SQLite Administrator... but for the first time I didn't have success with opening of database.
I had to change sqlite3.dll in folder of SQLite Administrator... I copied sqlite3.dll from directory of application where is *.s3db file...

Now I can see structure and data and I'm trying make connection through AutoIt... (both files are in script dir... i.e. *.s3db and sqlite3.dll )

But I can't even do _SQLite_Open, let alone _SQLite_Query

 

Please does anyone know where the problem can be?

Thanks in advance

#include <SQLite.au3>
#include <SQLite.dll.au3>
#include <MsgBoxConstants.au3>

Local $myconn, $hQuery, $aRow, $sMsg

_SQLite_Startup("sqlite3.dll", True, 1)
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)

$myconn = _SQLite_Open("file.s3db")
If @error Then
    MsgBox($MB_SYSTEMMODAL, "SQLite Error", "Can't open or create a permanent Database!")
    Exit -1
EndIf

_SQLite_Query(-1, "SELECT * FROM tabRegNazwy;", $hQuery)
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
    $sMsg &= $aRow[0]
WEnd
MsgBox($MB_SYSTEMMODAL, "SQLite", "Get Data using a Query : " & $sMsg)

_SQLite_Close($myconn)
_SQLite_Shutdown()
Edited by mostyr

Share this post


Link to post
Share on other sites



Google s3db to see that this isn't genuine SQLite but a proprietary fork (which the authors deny to mention). Better use their tools to manage their babies.


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)

Share this post


Link to post
Share on other sites

Hmm bad news for me  :(

Thanks anyway...

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
Sign in to follow this  
Followers 0