fielmann Posted January 13, 2009 Share Posted January 13, 2009 I'm using SQLite with autoit: #include <SQLite.au3> #include <SQLite.dll.au3> _SQLite_Startup() _SQLite_Open("Gala.db") $SQL = "SELECT * FROM my_table;" $result = _SQLite_Exec(-1,$SQL) if $result <> 0 then MsgBox(0,"SQL-Error","Can't execute SQL-Statement") _SQLite_Close() ; <- But what happens when I can't do it _SQLite_Shutdown() e.g. script abort abnormaly: what happens in that case with non-closed SQLite sessions? Link to comment Share on other sites More sharing options...
KaFu Posted January 13, 2009 Share Posted January 13, 2009 (edited) From help-file for dllclose(), as _SQLite_Startup() does a dllopen() with some additional checks...Upon termination, AutoIt automatically closes any dlls it opened but calling DllClose is still a good idea.Best Regards Edited January 13, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 13, 2009 Share Posted January 13, 2009 I'm using SQLite with autoit: #include <SQLite.au3> #include <SQLite.dll.au3> _SQLite_Startup() _SQLite_Open("Gala.db") $SQL = "SELECT * FROM my_table;" $result = _SQLite_Exec(-1,$SQL) if $result <> 0 then MsgBox(0,"SQL-Error","Can't execute SQL-Statement") _SQLite_Close() ; <- But what happens when I can't do it _SQLite_Shutdown() e.g. script abort abnormaly: what happens in that case with non-closed SQLite sessions? It's no big deal. SQLite does not have a server process that hosts "connections". It is based on simple file share with an internal file lock only while actually writing to the DB file. Everything _SQLite_Close() does is internal to your script and does not affect the state of the DB file itself. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now