diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-03-11 18:15:37 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-03-11 18:15:37 +0100 |
commit | dd70ff8bf32c2d7ed365004b1770058265db1978 (patch) | |
tree | 084788d142d86c4dc38f5c48606523b4040596e6 /src/sql/xbselect.cpp | |
parent | 517ad9d4b6eae320b708d03a9340a22893b0cab7 (diff) |
New upstream version 4.1.0upstream/4.1.0
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 )); } |