We have had many questions whether the Eloquera DB has a capability to work as an embedded database. The short answer is yes.
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 db = new DB("server=(local);password=pwd;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 and a configuration file from the %ProgramFiles%\Eloquera folder into a project folder:
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) Uninstall the Eloquera DB (sounds awful, but we have copies all files we will need)
3) Add Eloquera.config into your project via “Add an existing item…”, and set its "Copy to Output Directory" property to "Copy Always".
4) Add the project references to these files:
Eloquera.Client.dll
Eloquera.Server.exe
5) 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
6) You may change a physical path to the database files in the Eloquera.config file by setting DatabasePath value:
DatabasePath="c:\dev\db"
And now you can kiss the bride run your application.
Happy programming!