How to open the Schoolsplay database in GNU/Linux

Introduction

We have chosen to use OpenOffice Base to make reports of the Schoolsplay progress.
The reasons are obvious: OpenOffice is also open-source, it runs on all platforms and has good support. You can download it at www.openoffice.org.

A very good support forum for OpenOffice can be found at www.oooforum.org/.

I will be explaining the procedure here for GNU/Linux based systems, for Microsoft based systems see Howto open database Windows

Installing the SQLite ODBC driver

To be able to access the SQLite database that Schoolsplay for now uses, you need to install a driver for it, this can be found at [http://www.ch-werner.de/sqliteodbc/].

Download the latest tarball and unpack it.
Most GNU/Linux distro's will also provide a SQLite ODBC driver but you must have at least version 0.75, any older versions will not work so we gonna compile our own driver. (Relax, compiling is easy believe me :-)
Most distro's will already have installed the necessary packages to compile source code but in case you will get messages like
"bash: make: command not found" just install the packages you missing.

There are two package you must install before we can start compiling:
libsqlite3-dev and unixodbc-dev
Just use the package provided by your distro.

Start a X-term, or 'Terminal', and go to the unpacked driver directory:
cd sqliteodbc-0.75

Now type the following commands, as root:
./configure
Be aware of any errors about missing header files or whatever.
make install
( Never mind the following error, if shown: 'make: [install-3] Error 1 (ignored)' )

Check for this line which tells you were the driver is installed:
Libraries have been installed in:
/usr/local/lib
You need this location when you register the driver later.

Now were done and your driver is compiled and installed.

Register the driver

Your driver needs to be registered as root so you must start the 'ODBCConfig' program from within a X-term,
because you should never run your desktop as root.
odbc-linux-1.jpg

Choose tab 'Drivers' -> 'Add'
Give a name and a description, never mind which one as long as it's unique.
set driver path and setup path, both are the same file 'libsqlite3odbc.so' (symlink)
(Use Driver64, Setup64 if you have a 64 bit system)
Hit the 'v' shaped button to save your settings.
odbc-linux-2.jpg

Hit 'OK' to exit.
odbc-linux-3.jpg

Now as a regular user setup the dbase connection.
Choose tab 'User DSN' -> 'Add', choose the driver you've added above and hit 'OK'.
odbc-linux-4.jpg

Most fields will be already be filled, leave them as they are.
Give a name for your dbase connection.
Look up the dbase you want to connect to (For SP it will be '.schoolsplay.rc/sp.db)
Hit the 'v' shaped button to save it.
odbc-linux-5.jpg

Adding the ODBC driver to OpenOffice Base.

Start OpenOffice DataBase from the desktop menu.
Choose from the topbar menu:
"File > New > DataBase"
Choose "Connect to existing database" and choose "ODBC"
Hit "Next"
oo-linux-1.jpg

Hit the "Browse" button and choose the database name you want to add.
(This is the name you've gave when setting up the datasource, two images above)
Hit "Next"
oo-linux-2.jpg

There's no username or password in a SQLite database so leave the fields empty.
Hit the "Test connection" button to test the connection.
If this test fails then stop and try to setup your ODBC driver again.
Hit "Next"
oo-linux-3.jpg

Hit "Finish" button to register the database.
Save your database connection when prompted as a OpenOffice database.
oo-linux-4.jpg

Remember that the OpenOffice database is really a connection to the schoolsplay database.
Anything you change in the OpenOffice database will affect the schoolsplay database.
oo-linux-5.jpg

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.