You can use ODBC is order to work with databases. The support of ODBC is made through OLE server "ADODB.Connection". To see how it works go to the folder OLE and look at the samples db_read.pro, db_insert.pro and db_delete.pro. You will see how you can change the database source without any significant change in your program.
Yet another possibility to work with databases is the support of MySQL.
See also:
MySQL
OLE and ActiveX
Examples:
OLE / db_read.pro
OLE / db_insert.pro
OLE / db_delete.pro