Eloquera Database in the desktop mode
Eloquera DB has a capability to work as an embedded
database.
And
here are some details about what we call the desktop mode of the Eloquera DB.
Actually,
from the program point of view there is no difference between the client/server
and the desktop mode. The desktop mode doesn’t need a server or the Eloquera DB service running. Your application can be
distributed with a few Eloquera DB assemblies and
enjoy a full functionality of the Eloquera DB without
installing one (just don’t forget to drop us an email if you are going to do
so!)
To run
the Eloquera DB in the desktop mode use (local) as a
server name, like this:
db = new
DB("server=(local);password=;options=none;");
The
database will work in a single user mode, and, therefore, security is not
supported in the desktop mode. We have been asked if 2 or more users can share
the same database; of course, and that is called the client/server mode.
After
the installation the Eloquera Server service starts
automatically. Make sure that for the desktop mode you have stopped the
service. Otherwise, you may get exceptions about (local) being a wrong server
name (and that sounds pretty reasonable.)
There
is another option to start the Eloquera database in
the desktop mode.
1) Copy
the following assemblies:
Eloquera.config
Eloquera.Client.dll
Eloquera.Common.dll
Eloquera.Server.exe
You can
copy the reference files into a separate folder for your convenience.
2) Add Eloquera.config into your project via “Add an existing
item…”, and set its "Copy to Output Directory" property to "Copy
Always".
3) Add
the project references to these files:
Eloquera.Client.dll
Eloquera.Server.exe
4)
Rebuild your project and check that Debug\ and/or Release\ folders contain the
following files along with your application:
Eloquera.config
Eloquera.Client.dll
Eloquera.Common.dll
Eloquera.Server.exe
5) You
may change a physical path to the database files in the Eloquera.config
file by setting DatabasePath value:
DatabasePath="c:\dev\db"
From
our website you can download a sample project for desktop database.