Eloquera DB in the desktop mode

by Eloquera Team 2. June 2010 15:13

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!

Tags: , ,

About the company

Eloquera is an international company with offices in the US and Australia.

The Eloquera's mission is to provide developers with fast, powerful, yet easy to use object database solution hence shortening time to market, reducing development and maintenance costs.

The official Eloquera forum is available here

Eloquera supports Open Source groups via Eloquera Open Source Group.

For any enquiries just drop an email to our friendly staff info@eloquera.com or simply mail us at

Eloquera
P.O. 57484
Chicago, IL 60657-0484
USA

Eloquera
P.O. 611
Missions Point, Sydney, NSW 1565
Australia

Eloquera Database Usage Survey
http://survey.eloquera.com/survey.aspx

Quotes...

Eloquera in a public safety…

I needed to replace the standalone relational database in my commercial .Net software and while searching I discovered Eloquera's object database. I decided to give it a try and the more I used it, the more it felt like to logical way to store data. You wouldn't believe the amount of code I removed from the previous version just to convert my objects to a database compatible format and then back to object. 

Support is great and fast and new features come often, the price is hard to beat and best of all, no royalties for commercial applications.

It completely changed the way I now look at a database and I highly recommend it.

Sebastien Dupuis

Solutions IvSoft Inc
www.ivsoft.net