Hi Thomas,
here is some sample code on how to operate a sqlite database. Hope it helps:
Code: |
#include <mms.h>
int main(int argc, char *argv[]) {
// define the source properties
DataSource source(DBMS_SQLITE3,"./mydb");
// create a connection manager for source
MMSDBConnMgr conmgr(&source);
// retrieve connection
IMMSDB *conn = conmgr.getConnection();
// do a query with results
MMSRecordSet rs;
conn->connect();
conn->query("select * from test;", &rs);
if(rs.getCount()>0)
do{
std::cout << rs["Name"] << endl;
} while(rs.next());
return 0;
}
|
kind regards
Stefan