diff options
Diffstat (limited to 'src/sql/xbselect.cpp')
-rwxr-xr-x | src/sql/xbselect.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/sql/xbselect.cpp b/src/sql/xbselect.cpp index 91c0485..7f12e99 100755 --- a/src/sql/xbselect.cpp +++ b/src/sql/xbselect.cpp @@ -21,18 +21,23 @@ namespace xb{ /***********************************************************************/ -xbInt16 xbSql::SqlSelect( const xbString &sCmdLine ){ +xbInt16 xbStmt::ExecuteQuery( const xbString &sCmdLine ){ - std::cout << "SELECT [" << sCmdLine << "]\n"; + std::cout << "xbStmt::ExecuteQuery() - SELECT [" << sCmdLine << "]\n"; // expected format: // SELECT xbInt16 iRc = 0; xbInt16 iErrorStop = 0; - xbUInt32 ulPos; + // xbUInt32 ulPos; try{ + if(( iRc = ParseStmt( sCmdLine )) != XB_NO_ERROR ){ + iErrorStop = 100; + throw iRc; + } + /* xbString sCmd = sCmdLine; sCmd.Trim(); @@ -63,12 +68,12 @@ xbInt16 xbSql::SqlSelect( const xbString &sCmdLine ){ if( sToken == '^' ){ if(( iRc = uda.DelTokenForKey( sKey )) != XB_NO_ERROR ){ - iErrorStop = 10; + iErrorStop = 100; throw iRc; } } else { if(( iRc = uda.UpdTokenForKey( sKey, sToken )) != XB_NO_ERROR ){ - iErrorStop = 10; + iErrorStop = 110; throw iRc; } } @@ -78,7 +83,7 @@ xbInt16 xbSql::SqlSelect( const xbString &sCmdLine ){ } catch (xbInt16 iRc ){ xbString sMsg; - sMsg.Sprintf( "xbSql::SqlSelect() Exception Caught. Error Stop = [%d] rc = [%d]", iErrorStop, iRc ); + sMsg.Sprintf( "xbStmt::ExecuteQuery() Exception Caught. Error Stop = [%d] rc = [%d]", iErrorStop, iRc ); xbase->WriteLogMessage( sMsg.Str() ); xbase->WriteLogMessage( GetErrorMessage( iRc )); } |