Changeset 11020 for trunk/FACT++/src
- Timestamp:
- 06/14/11 18:06:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Configuration.cc
r10796 r11020 389 389 390 390 mysqlpp::Connection conn(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port); 391 /* throws exceptions 391 392 if (!conn.connected()) 392 393 { 393 394 cout << "MySQL connection error: " << conn.error() << endl; 394 395 throw; 395 } 396 }*/ 396 397 397 398 // Retrieve a subset of the sample stock table set up by resetdb 398 399 // and display it. 399 400 // FIXME: What about a prefix? 400 mysqlpp::Query query = conn.query("select `Key`, Value from Configuration"); 401 402 mysqlpp::StoreQueryResult res = query.store(); 401 const mysqlpp::StoreQueryResult res = conn.query("select `Key`, Value from Configuration").store(); 402 /* throws exceptions 403 403 if (!res) 404 404 { 405 405 cout << "MySQL query failed: " << query.error() << endl; 406 406 throw; 407 } 407 }*/ 408 408 409 409 set<string> allowed_options; … … 421 421 po::parsed_options result(&desc); 422 422 423 for (vector<mysqlpp::Row>:: iterator v=res.begin(); v<res.end(); v++)423 for (vector<mysqlpp::Row>::const_iterator v=res.begin(); v<res.end(); v++) 424 424 { 425 425 const string key = (*v)[0].c_str();
Note:
See TracChangeset
for help on using the changeset viewer.