Jump to content
Sign in to follow this  
matwachich

Where is SQLite???

Recommended Posts

matwachich

Hi all.

Why is the new 3.3.8.0 Au3 version doesn't embarque the SQLite dll and offline doc???

And, more important, where can i find them??? (both)

Thanks!

Edited by matwachich

Share this post


Link to post
Share on other sites
VixinG

Databases and web connections

  • FTP - A FTP library is now included with the AutoIt libraries.
  • SQLite - "SQLite is a library that implements a self-contained, embeddable, zero-configuration SQL database engine"
  • XML DOM Wrapper - Supports CRUD operations on XML. Including XSL and XPath.
  • MySQL - MySQL relational database management system UDF.

~Found on http://www.autoitscript.com/wiki/UDF

Edited by VixinG

[indent=3][/indent]

Share this post


Link to post
Share on other sites
jchd

Mat, forget the link to the old post about SQLite, it's obsolete.

Download latest DLL(s) from the repository and use either sqlite3.dll or sqlite3_x64.dll

New versions of AutoIt don't carry both DLLs anymore, due to space they eat and relative little use.

Edited by jchd

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
matwachich

Thanks jchd, after reformating my computer, i lost the link to that repository, and when i tried the one in sqlite.dll.au3, it was 404 not found!

Just another question:

What's the difference between the latest dll in the repo (SQLite3_300701100.dll) that is version 3.7.11, 640ko, and No TCL AND the dll i got from the official SQLite website that is also 3.7.11, but only 567ko???

PS: and for the documentation, that became only 17ko! where can i find an offline version?

THANKS

Edited by matwachich

Share this post


Link to post
Share on other sites
ProgAndy

What's the difference between the latest dll in the repo (SQLite3_300701100.dll) that is version 3.7.11, 640ko, and No TCL AND the dll i got from the official SQLite website that is also 3.7.11, but only 567ko???

The files you can download on autoitscript.com is compiled by the AutoIt developers and should always work with AutoIt. I don't know whether the official download on SQLite can guarantee that. At least, the x64 version is missing there I think. By the way, the download without a version number is also the most recent version. Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
jchd

The whole story is available from the SQLite website.

To see what's differing, run the following code after pointing _SQLite_Startup to the DLL you whish informations about.

;~ #AutoIt3Wrapper_run_debug_mode=Y
#include <SQLite.au3>
;~ #include <SQLite.dll.au3>  ; use only if you don't have /want the sqlite3.dll file by itself
Local $hDB ; DB handle
; use default .dll and allow for Unicode console output
Local $DllPath = _SQLite_Startup(Default, 1)
If @error Then
MsgBox(0, "Fatal", "sqlite3.dll can't be found.")
Exit
EndIf
OnAutoItExitRegister("_SQLite_ShutDown")
ConsoleWrite("Using " & $DllPath & @LF)
; [re]set SafeMode
Global $safemode = 0
_SQLite_SafeMode($safemode)
$hDB = _SQLite_Open()
If @error Then
ConsoleWrite("@error = " & @error & ', @extended = ' & @extended & @LF)
MsgBox(0, "Fatal", "Error opening DB.")
Exit
EndIf
OnAutoItExitRegister("_DbClose")
; get SQLite info
ConsoleWrite("SQLite library version " & _SQLite_LibVersion() & @LF)
ConsoleWrite("Built from source ID " & _Sl3Answer($hDB, "select sqlite_source_id();") & @LF)
ConsoleWrite("Compile options:" & @LF)
Local $data, $rows, $cols, $i
While 1
$i += 1
$data = _Sl3Answer($hDB, "select sqlite_compileoption_get(" & $i & ");")
If Not $data Then ExitLoop
ConsoleWrite(@TAB & $data & @LF)
WEnd
ConsoleWrite("Registered collations" & @LF)
_SQLite_GetTable2d($hDB, "pragma collation_list;", $data, $rows, $cols)
ConsoleWrite(_SQLite_Display2DResult($data))
Func _DbClose()
_SQLite_Close($hDB)
EndFunc   ;==>_DbClose

Func _Sl3Answer($hDB, $sql)
Local $row
Local $rtn = _SQLite_QuerySingleRow($hDB, $sql, $row)
If $rtn = $SQLITE_OK Then
  Return ($row[0])
Else
  Return (SetError(@error, $rtn, ''))
EndIf
EndFunc   ;==>_Sl3Answer

The version from AutoIt repository includes FTS3 and RTree support. Note that FTS3 implies FTS4 (which is better).

Edited by jchd

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
matwachich

Ok!

I think this thread is resolved!

Gonna use the version compiled by autoit devs.

Thanks guys!

PS: what about the doc... :oops: ?

Share this post


Link to post
Share on other sites
kylomas

matwachich,

SQLite doc can be downloaded from http://www.sqlite.org/sqlite-doc-3071100.zip. Doc for the AutoIT wrappers is in the help file.

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

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  

  • Similar Content

    • Seminko
      By Seminko
      In my recent project I'm downloading a bunch of data, so I decided to store it in a SQLite database. NOTE: I'm using sqlite3_x64.dll
      Everything is working just fine but I'm struggling with getting the Median value. SQLite has an Average function but not a Median one.
      I googled but all of the provided solutions are way above my pay-grade. After some more searching I found 'extension-functions.c' on the SQLite site where Median is included. After almost an hour of struggling I was able to successfully compile it into a DLL.
      So I downloaded @jchd's SQLiteExtLoad.au3 as seen here:
      But I'm getting these errors:
      "Path\SQLiteExtLoad.au3"(21,40) : warning: $g_hDll_SQLite: possibly used before declaration. Local $RetVal = DllCall($g_hDll_SQLite, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "Path\SQLiteExtLoad.au3"(21,40) : error: $g_hDll_SQLite: undeclared global variable. Local $RetVal = DllCall($g_hDll_SQLite, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ So I tried, copying the function to my file and changing the DLL variable ($g_hDll_SQLite) directly to the DLL location (C:\...\.. .dll), but now this error fires
      If __SQLite_hChk($hConn, 1) Then Return SetError(@error, 0, $SQLITE_MISUSE) To be honest, I don't know what to use as the $hConn - handle of connection.
      I would appreciate any help, be it getting the median using SQLite queries or getting the DLL extension loaded using AutoIt.
      Thanks, S.
       
      EDIT: well, I suspect the $hConn variable refers to the return value of the _SQLite_Open function. Well, at least now _SQLite_EnableExtensions doesn't give errors. Now I run into problems with _SQLite_LoadExtension, which gives error -1, and extended 1. Apparently the 1 constant is a generic error where other error do not apply.
      BTW, anybody knows whether I need to compile the extension DLL "into" x64 when I use a x64 SQLite? That might be the problem...
       
      EDIT2: I recompiled the dll and tried it using the SQLite3.exe and it works, so I'm confident the extension DLL has been created correctly

    • AdamUL
      By AdamUL
      I have been testing AutoIt 3.3.14.3 with SQLite, and the Help File examples.  The examples that I have tested are throwing errors or not doing anything.  I have sqlite3.dll, sqlite3_x64.dll, and sqlite3.exe in the directories with the testing script.  I am copying the examples directly from the help file into a test script for testing with no edits.  The _SQLite_GetTable2d example is returning an error ("Library used incorrectly") with each _SQLite_Exec command.  The _SQLite_FastEncode example returns an empty dialog box.  The _SQLite_Exec example only prints out the SQLite version, and nothing else in the SciTE console.  Currently, I'm still searching for what is causing this issue.  I'm on Windows 7 Enterprise 64-bit.  Is anyone else having this issue?  
       
      Adam
       
    • Burgs
      By Burgs
      Greetings,
        I have SQLite setup within my AutoIT program...I'm trying to accomplish what should be a relatively simple task.  I want to be able to return an array of 'table' names for an established database...I believe this might be possible using the '_SQLite_SQLiteExe' command...since it seems to be able to access SQLite schemas...?  The ".tables" command is one of them...if I am not mistaken that command returns a list of all table names in the active database.
        I am attempting the following:
      #include <SQLite.au3> #include <SQLite.dll.au3> Global $hDb, $sIn, $sOut ... $sIn = ".tables" & @CRLF _SQLite_SQLiteExe($hDb, $sIn, $sOut) if @error == 0 Then ;Show Table (using SQLite3.dll) Else if @error == 2 Then ConsoleWrite("ERROR: Sqlite3.exe file not found" & @CRLF) Else ConsoleWrite("ERROR: @error=" & @error & " when calling _SQLite_SQLiteExe" & @CRLF) EndIf ;@error is "2"...OR NOT... EndIf ;@error is "0"...OR NOT... ...   The error being thrown is "ERROR: Sqlite3.exe file not found" ...
        Am I required to have the Sqlite3.exe installed in my directory (i.e. @ScriptsDir)...???  I do not have it in there at present because I did not believe it was necessary with the 'include' calls to "SQLite.au3" and "SQLite.dll.au3"...any advice appreciated.  Thanks in advance. 
      Regards
       
       
       
       
       
       
       
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good evening guys
      I am working on a little project, in which I have to retrieve 8000+ rows of data from a table, from a SQLite database, to populate a combobox 
      This is what I tried 'til now, but it still takes about 12 seconds to populate the combobox.
      _SQLite_Exec($objDatabase, "BEGIN TRANSACTION;") If _SQLite_GetTable($objDatabase, "SELECT DISTINCT Comune FROM LISTA_COMUNI;", $arrRisultatoQuery, $intRighe, $intColonne) = $SQLITE_OK Then For $i = 2 To UBound($arrRisultatoQuery) - 1 If $i < UBound($arrRisultatoQuery) - 1 Then GUICtrlSetData($cbo_ComuneNascita, $arrRisultatoQuery[$i] & "|") Else GUICtrlSetData($cbo_ComuneNascita, $arrRisultatoQuery[$i]) EndIf Next _SQLite_Exec($objDatabase, "COMMIT;") Are there any other solution to retrieve 8000+ records from a SQLite database?
      Thank you very much  
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning community!
      I am working on a script which read from a text file ( .txt ) and should import all the content in a SQLite3 DB, in order to execute some queries that should be difficult to execute on a text file.
      So, I was looking for something very very fast, because the file could be very large ( I don't know exaclty how much can became big, but I know a lot of rows, it's a log file ... )
      I found the "Import method", but I don't know If I can implement it in a query ( @jchd, it's your turn!  )
      Do you know some methods that I can implement in my script to have a very very fast import of thousands and thousands rows in a SQLite3 DB?
      Thanks a lot
      Francesco
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.