VistaDB: Running on Mono

Behind door number 10, on the Gibraltar Advent Calendar, is this little treat showing you how to run VistaDB on Mono. For this example, I’ll be using the Raspberry Pi, as it’s my new favourite little toy right now, but this technique will work on any Mono installation.

So, first thing we’re going to want to do is to create our database, using VistaDB Data Builder:

2012-12-10-1

As you can see, we’re keeping things nice and simple for this demonstration.

Next, using WinSCP, or a similar product, drag your VDB4 file across to your Mono installation. Don’t forget to also drag the VistaDB DLL across to, if you followed the installation defaults, then you’ll find this DLL file in C:\Program Files (x86)\VistaDB 4.3.3\Runtimes.

Now, on your Mono installation, start Nano, or your favourite editor or IDE, and write some code to exercise your database. Something like this will do:

2012-12-10-2

and save it as test.cs.

Having done that, we need to compile it, remembering to link to the VistaDB DLL:

2012-12-10-3

This will create the test.exe file, which we can now run:

2012-12-10-4

And everything works as expected.

Well that’s all for this post, until next time, happy coding!

The No Hassle Embedded Database for .NET

License your team and deploy worldwide, royalty-free, starting at $1,595/site