Changes between Version 7 and Version 8 of Docs/Prog/Manual/ApplicationLibraries/lib825db


Ignore:
Timestamp:
10/23/25 07:09:11 (3 weeks ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825db

    v7 v8  
    3737}
    3838}}}
     39
     40Replace with code similar to:
     41{{{
     42        if(appDBcfg.GetDBType() == CAppDatabaseCfg::appDataMySQL) {
     43                appDB = new CDBMySQL(appDBcfg.GetServer(), appDBcfg.GetUser(), appDBcfg.GetPassword(), appDBcfg.GetDatabase());
     44        } else {
     45                path = appDataPath + "ids.db3";
     46                appDB = new CDBSQLite(path);
     47        }
     48
     49        if(appDB->OpenDatabase() == false) {
     50
     51                DEBUG_MSG("Error [%s]\n", appDB->GetErrorMsg().c_str());
     52                DrawErrorBox("Cannot open database", 4);
     53                return false;
     54        }
     55
     56
     57}}}
     58