Ignore:
Timestamp:
08/20/04 11:25:36 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msql/MSQLServer.cc

    r4577 r4694  
    410410}
    411411
     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//
    412425TSQLResult *MSQLServer::Query(const char *sql) /*FOLD00*/
    413426{
    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;
    415441}
    416442
Note: See TracChangeset for help on using the changeset viewer.