| Version 7 (modified by , 3 weeks ago) ( diff ) |
|---|
Library for SQLite and MySQL database support (lib825db)
lib825db provides a base class CDB and inherited class CDBSQLite and CDBMySQL to facilitate apps being able to use common code for SQLite and MySQL databases.
Most of our existing apps using SQLite use the C++ wrapper code namespace sq3 provided by libsql, libsql3_7_9, or lib825sql. To edit this code to use lib825db instead is fairly simple.
Existing apps will have
#include "sqlite3.h" #include "sq3.hpp" using namespace sq3;
Replace with
#include "dbsql.h"
Existing apps will have global database instance such as:
database db;
Replace with:
CDB* appDB = nullptr;
Existing apps will have code to open the database such as:
db.open("/mnt/nand/apps/<appdir>/myapp.db3");
if(!db.is_open) {
DrawErrorBox("Error opening database", 2);
}
Note:
See TracWiki
for help on using the wiki.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/cardinal.gif)