Diff for /sql/odbc/parser3odbc.C between versions 1.7 and 1.9

version 1.7, 2002/04/25 17:51:38 version 1.9, 2002/05/15 14:06:07
Line 148  public: Line 148  public:
                         statement++;                          statement++;
                                   
                 TRY {                  TRY {
                         if(strncasecmp(statement, "select", 6)==0) {                          // mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\adosql.chm::/adoprg02_4g33.htm
                           // Server cursors are created only for statements that begin with: 
                           // SELECT
                           // EXEC[ute] procedure_name
                           // call procedure_name
                           // mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\odbcsql.chm::/od_6_035_5dnp.htm
                           // The ODBC CALL escape sequence for calling a procedure is:
                           // {[?=]call procedure_name[([parameter][,[parameter]]...)]}
                           if(strncasecmp(statement, "select", 6)==0
                                   || strncasecmp(statement, "EXEC", 4)==0
                                   || strncasecmp(statement, "call", 4)==0
                                   || strncasecmp(statement, "{", 1)==0) {
                                 CRecordset rs(db);                                   CRecordset rs(db); 
                                 rs.Open(                                  TRY {
                                         CRecordset::forwardOnly,                                           rs.Open(
                                         statement,                                                  CRecordset::forwardOnly, 
                                         CRecordset::executeDirect                                                     statement,
                                         );                                                  CRecordset::executeDirect   
                                                   );
                                   } CATCH_ALL (e) {
                                           // could not fetch a table
                                           TRY {
                                                   // then try resultless query
                                                   db->ExecuteSQL(statement);
                                                   // OK then
                                                   return;
                                           } CATCH_ALL (e2) {
                                                   // still nothing good
                                                   _throw(services, e); // throw ORIGINAL exception
                                           } END_CATCH_ALL
                                   } END_CATCH_ALL
   
                                 int column_count=rs.GetODBCFieldCount();                                  int column_count=rs.GetODBCFieldCount();
                                 if(!column_count)                                  if(!column_count)
Line 213  public: Line 237  public:
                         } else {                          } else {
                                 db->ExecuteSQL(statement);                                  db->ExecuteSQL(statement);
                         }                          }
                 }                   } CATCH_ALL (e) {
                 CATCH_ALL (e) {  
                         _throw(services, e);                          _throw(services, e);
                 }                  } END_CATCH_ALL
                 END_CATCH_ALL  
         }          }
   
         void getFromDBVariant(SQL_Driver_services& services, CDBVariant& v, void *& ptr, size_t& size) {          void getFromDBVariant(SQL_Driver_services& services, CDBVariant& v, void *& ptr, size_t& size) {

Removed from v.1.7  
changed lines
  Added in v.1.9


E-mail: