It seems a lot of us have problems handling *sql* databases. This is a small part of an app that reads/writes extensibly from/to a MySQL db. It shouldn't be any different using other db-engines.
Use it more as a template on how to.
Unfortunately I can't supply the actual db tables, they are owned by my customer.

/Henning