Installing and Configuring mSQLite

mIRC SQLite

Installing and Configuring mSQLite
Installing
Installing mSQLite is easy and quick.
After extracting the contents of the archive to a wanted destination, you should see these files:
msqlite.chm   Documentation file.
msqlite.dll   DLL file.
msqlite.ini   Configuration file.
msqlite.mrc   Script file.
If you do, the next step is to load the script in mIRC. Assuming you extracted the archive to mIRC folder, you can load mSQLite with:
/load -rs msqlite.mrc
If you extracted the archive to somewhere else than mIRC's root folder, you need to specify the path to the folder as well, for example:
/load -rs C:\scripts\msqlite\msqlite.mrc
If everything went correctly, mIRC should popup a message box asking whether you want to run the initialization script. You should choose Yes, although choosing No will not break the library either; It will just use the default configuration settings. That's it, you're done!
Configuring
mSQLite has a couple of configuration options in its configuration file (msqlite.ini). They are the following:
[MSQLITE]
id             An unique identifier for the library.                        (Default: Empty)
busy_timeout   Default busy timeout for new connections, in milliseconds.   (Default: 300)
The id option can be used to tell mSQLite to use a specific id for the library. By default id option is empty, which means that mSQLite finds a free unique id automatically, but in case you want force it to use a specific id, this option can be used.

The busy_timeout option instructs mSQLite to wait for at least specified amount of milliseconds when a query tries to operate on a locked database. If mSQLite obtains access to the database before busy timeout occurs, the operation is executed normally, otherwise an error is returned and %sqlite_errno is set to $SQLITE_BUSY. Read more about error handling in Handling Errors.. You can change busy timeout per-connection basis with sqlite_busy_timeout command.
[PRAGMAS]
pragma         Pragma query to be executed by default when new database connection is opened.
The pragma directive is useful if you want to change default functionality of the library for all connections, because pragmas specified in the configuration file will be run everytime mSQLite opens a new connection to a database. You can have multiple pragma directives, and they must be under [PRAGMAS] section.
[EXTENSIONS]
extension      An extension to be loaded automatically when new database connection is opened.
The extension directive can be used to automatically load extensions for all new database connections. This is useful if you have general purpose extensions that you want to be able to use without explictly loading the extension with sqlite_load_extension for every connection. The extensions are opened from the script directory of mSQLite unless an absolute path is specified. You can have multiple extension directives, and they must be under [EXTENSIONS] section.
Managing
Even though SQLite is very easy to learn and it's simple to do all sorts of queries, such as creating tables, it's always nice to have a visual managment tool that you can use to view your database structure, browse data and so on. There are a great deal of such tools out there, some of which are free, and some that are not. Here's a list of database managment tools for SQLite, with their price (if any): http://www.sqlite.org/cvstrac/wiki?p=ManagementTools.
You most likely don't want to try every single one of them to find out which are good, so in case you just want to get started quick you can take a look at the free, nice managment tool I use, SQLite Spy. SQLite Spy doesn't have a visual editor for creating tables, but it's by far the best visual browser for SQLite I've used. Another free tool that looks very promising, with features such as SQL code completion is SQLite Administrator.

The SQLite Wiki also has a great deal of other useful tools, like for converting databases between different database formats, and information on SQLite and how to use it more effectively. So if you're interested in reading more, check it out.