Changeset 4694 for trunk/MagicSoft/Mars/msql/MSQLServer.cc
- Timestamp:
- 08/20/04 11:25:36 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msql/MSQLServer.cc
r4577 r4694 410 410 } 411 411 412 // -------------------------------------------------------------------------- 413 // 414 // Send a SQL query to the SQl server. 415 // 416 // If MSQLServer is no server (column, row, ...) NULL is returned and an 417 // error message is send to stdout. 418 // 419 // If the query failed for some reason an error message is send to stdout 420 // and NULL is returned. 421 // 422 // If everything works fine a TSQLResult is returned. Make sure that you 423 // delete it! 424 // 412 425 TSQLResult *MSQLServer::Query(const char *sql) /*FOLD00*/ 413 426 { 414 return fType==kIsServer ? fServ->Query(sql) : NULL; 427 if (fType!=kIsServer) 428 { 429 cout << "ERROR: MSQLServer::Query - this is not a server!" << endl; 430 return NULL; 431 } 432 433 TSQLResult *res = fServ->Query(sql); 434 if (!res) 435 { 436 cout << "ERROR: MSQLServer::Query - Query failed: " << sql << endl; 437 return NULL; 438 } 439 440 return res; 415 441 } 416 442
Note:
See TracChangeset
for help on using the changeset viewer.