• Welcome to SQLitening Support Forum.
 

Entire new code base for SQLite Client/Server is coming...

Started by Paul Squires, June 20, 2008, 06:04:59 PM

Previous topic - Next topic

Paul Squires

Hi Everyone,

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.
   slConnect "LocalHost"

   ' Open
   slOpen "sample.db3"

   ' 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")
   loop

   slClose

   slDisconnect



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.

Stay tuned....

:)


Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

Jim Harre

Wow! This does sound exciting. Can't wait to see the new implementation. ;D ;D ;D

Mark Strickland

Paul,

WOW!

As you know I have a work in progress of converting our large pharmacy app to your SQLite C/S.  It has been stalled for the last couple of months due to some required changes in the old Cheetah based version.

I am planning a "big push" over the next weeks --- so how close are you?

I don't mind being a "beta" tester so I can move forward with the new code base even if there are some bugs.  This will let me keep moving without going back and recoding too much.

Mark
Mark Strickland, CISSP
www.SimplyBASICsecurity.com

Paul Squires

I just got back in town from a business trip. Waiting in my inbox was an email from Fred Meier with more additions and enhancements to the code base. He is now testing the package across an internet connection with a friend of his (some firewall issues). I will integrate his changes into a new package that I will upload this weekend. The documentation will be incomplete but at least it will be a start for people to get a look at.

Mark - I really hope the new client/server will meet the needs of your pharmacy project. I will use it for my accounting project (if I ever get the chance to get back at coding it!!!)  :)

Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

Dwight Scoles

Are there any plans to allow use of some of the encryption functionality that are offered for the SQLite product?  The main reason I use Tsunami is that I need encryption with the ability to run selects transparently.  I would love to use the SQLite3 database instead.

Dwight

Paul Squires

Encryption? Sure, why not?  :)  I wouldn't expect encryption in the very near future but there's no reason that it can't be added later. The whole project is open source so hopefully someone will step up and donate encryption code or design ideas on how to implement the encryption. Myself and/or Fred could include the stuff in an "official" download package.
Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

Mark Strickland

Paul,

I look forward to seeing the code.

Yep --- Our "day jobs" interfere with our ability to spend more time on our "higher endeavors".   :(  But they do provide other benefits ... like eating.   :)

In my "day job" we keep pushing down the Dot Net path (I don't do any coding) and Oracle but we are so far down the path it is too late to turn back.   :-[  Ahhhhh but my in "other job" I get to use FireFly, PB, and now SQLite ... bliss.   8)

Thanks to you and Fred for your contributions.  ;D

Mark
Mark Strickland, CISSP
www.SimplyBASICsecurity.com