Sign in to follow this  
Followers 0
fielmann

Basic question: _SQLite_Open ()

3 posts in this topic

Hi Folks,

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

_SQLite_Startup ()
If @error > 0 Then
    MsgBox(16, "SQLite Error", "SQLite.dll Can't be Loaded!")
    Exit - 1
EndIf
_SQLite_Open (); Open a :memory: database
If @error > 0 Then
    MsgBox(16, "SQLite Error", "Can't Load Database!")
    Exit - 1
EndIf
_SQLite_Close ()
_SQLite_Shutdown ()

Basic question: Why should I open a database as a "memory database"? :)

When I close the database the content is lost <- correct ?! :)

Share this post


Link to post
Share on other sites



Hi Folks,

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

_SQLite_Startup ()
If @error > 0 Then
    MsgBox(16, "SQLite Error", "SQLite.dll Can't be Loaded!")
    Exit - 1
EndIf
_SQLite_Open (); Open a :memory: database
If @error > 0 Then
    MsgBox(16, "SQLite Error", "Can't Load Database!")
    Exit - 1
EndIf
_SQLite_Close ()
_SQLite_Shutdown ()

Basic question: Why should I open a database as a "memory database"? :)

When I close the database the content is lost <- correct ?! :)

Yes all the content is lost when you close it.

You might want to temporarily store a load of data and use an SQL query to sort the information out for what you need but you might not be interested in retaining the data after you have used it

Share this post


Link to post
Share on other sites

Because it's much faster than a file database... for saving the contents take a look at my signature :), i wrote a UDF for that. For re-loading the content take a look at the source of SMF (I'm too lazy now to look up the function).

Best Regards

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