Consider this post a tease for something really exciting that is coming for SQLite Client/Server. Here are the highlights:
- Our programming friend, Fred Meier, has generously donated an entire new code base that handles local, and client/server access to the sqlite3 DLL. The code base will be made available very soon to all users. It is public domain in the same vein as the SQLite Client/Server.
- The name of the project will change from SQLite Client/Server to "SQLitening".
- Informal timings indicate that for most tasks the new code base performs from 40% to 80% faster than the existing SQLite Client/Server code.
- Full error handling with text messages. Error requests can either exit the process or just return %False, depending on passed ModChar.
- Server makes sure the SQLite Dll is thread safe and allows multi threading of SQLite commands.
- Server will close all open databases when a connection ends. If a client forgets to issue the close or the client
process abnormally ends for any reason, the database file remains "in use/locked" until the server is shut down. Not good. The new code base addresses this problem.
- The server runs as a service. This is required so it can run without a user being logged in. The service implementation in the new code base is extrememly well done and makes it a breeze to install/uninstall and start/stop the service.
- Server has a Log. It records major events and will shrink when too large.
- The local and client/server support binding of text, BLOB, and null.
- The new code base "hides" the database handle returned from the Open making the code easier to handle.
- The new code base implements a File Access Control Table (FACT). It allows you to assign one or more passwords to a file. Multiple passwords allows you to change the password from one to another over time. Two special passwords of * and ! are allowed. ! for protected files and * for no checking. If a file is not in the FACT then access is allowed with no checking. Admin now has ability to refresh the FACT.
As you can see, the new code base is extremely robust and implements many more features than my original concept. I am sure that everyone will be very pleased with the new code when it is posted. Documentation is currently being worked on and will need to be completed before the first upload of the code is made available.
Here is a sneak peak of how simple the code is:
' Connect -- omit this statement to run local in local mode.
' If you are connected to a server then you can run databases in local mode
' by using the slSetProcessMods function.
' Select record set
slSel "Select * from Parts;"
' Process records
do while slGetRow
' slF() retrieves column data based on field number.
' slFN() retrieves column data based on field name.
sRow = slF(1) & ", " & slF(2) & "," & slFN("Product")
The new code base implements over 30 functions that make working with SQLite3 incredibly easy.
Both code bases will co-exist for a short time. The long term plan is to phase out my code and go with the new code base as soon as possible.