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:
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:
and save it as test.cs.
Having done that, we need to compile it, remembering to link to the VistaDB DLL:
This will create the test.exe file, which we can now run:
And everything works as expected.
Well that’s all for this post, until next time, happy coding!
In the meantime, what feature is on your Gibraltar Software Christmas List? Share your ideas with us on Facebook and you’ll have a chance to win a fantastic prize!