Post by Sarah M. WeinbergerMySQL is for purchase and installation on a server
and not for distribution with a shareware application.
I need a local database engine. Sadly, if ACE
requires the purchase of Access, then that leaves
that out as well. :-(
Then you should seriously try SQLite (Public Domain
license - usable for any purpose).
The engine has a very clean structured codebase
(covered by a huge Test-Set) - an active developer-
community (new releases every 2 months or so) -
it is small and fast and can be used on a very broad
range of Operating-systems and Processors (e.g. on
ARM-devices as the iPhone) - but of course it is not
limited to these "embedded environments".
E.g. Firefox or the new Google-Browser use it as
their local "Desktop-Engine", to support Offline-
Modes and other things.
Combined with my wrapper-classes you can achieve
ca. factor 1.5-3 better Read-Performance with your
Selects - and a much better Write-Performance regarding
Inserts (ca. factor 15 - 40) compared with ADO/JET.
The single-file-DB has no size-limit (as you see on
*.mdbs) - it supports triggers (which are not available
with the JET-engine) and of course Views, you can easily
work with InMemory-DBs, to use and handle your larger
local Data-Structs not in Arrays, but over SQL-statements
regarding fast sorting or filtering if you want, etc..
Regarding the functionality of my wrapper-classes -
they are nearly similar to use as the ADO-Objects
(Connection-, Recordset- and Command-Objects)
and the wrapper also enhances the original SQLite-
engine with builtin VB-Functions, which you can use
in your Selects as e.g. IIf(), Instr(), Format$(), Left$(),
Mid$, Trim$, CLng(), CDate(), DatePart() and many
others, which behave exactly the same way as they
are defined in the VB-Runtime (its a simple redirection).
And other than in *.mdbs (when used over VB5/6)
you can define your own userdefined functions or
aggregate-functions in plain VB-Code.
Some other nice features of the wrapper-classes:
The Recordsets can be serialized to ByteArrays
very fast (ca. factor 6-8 faster than ADO-Rs) with:
Dim B() as Byte
B = Rs.Content
'(now store B in a File or send it over sockets -
or whatever)
'deserialization goes this way
Set Rs = New cRecordset
Rs.Content = B
You can also store the current content of a Recordset
with ease e.g. in a (Temp-)Table of your DB or
directly in an InMemoryDB-Cnn as shown below:
(with autocreation of the appropriate table-structure)
Dim B() as Byte, Cnn as cConnection
B = Rs.Content 'Rs e.g. retrieved from a filebased DB
Set Cnn = New cConnection
Cnn.CreateNewDB 'without arguments creates an InMem-DB
Cnn.CreateTableFromRsContent B, "MyTableName"
The above can come very handy e.g. inside CD-based
"catalog-Apps" - if you don't want to expose your DB
on your distributed CD or whatever.
You would simply have to store the TableContents of
your real DB-Tables inside Byte-Arrays (over the Rs-
serialization-feature described above) and bind these
ByteArrays statically into your App.exe as a resource
and create an InMemory-DB from this Rs-content on
App-startup using 'CreateTableFromRsContent'.
But the single-file-DBs can also be encrypted with
strong encryption, offering nearly similar performance
as unencrypted DBs (only ca. 10-15% loss).
All in all a very nice alternative to ADO/JET which
works on every current Win-OS and also on Linux/Wine.
Simple MultiUser-Mode over Network-Shares is
also possible in the same way as with *.mdbs - but
you can also switch to a real "SQLServer-Mode" using
the Application-Server which is also built into the
small set of three Dlls - this allows you to create
high performance nTier-Applications with your own
"stored procedures" which you can formulate in plain
VB6-classes, sitting inside an VB-AX-Dll-Project.
Just let me know, if you have problems with the
installation/usage of the DemoSet - maybe the
best place to ask questions regarding SQLite-
over VB6 is microsoft.public.vb.database.
Olaf
P.S. @Ralph - thanks for the "backup"