From dd70ff8bf32c2d7ed365004b1770058265db1978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 11 Mar 2023 18:15:37 +0100 Subject: New upstream version 4.1.0 --- src/sql/xbselect.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/sql/xbselect.cpp') 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 )); } -- cgit v1.2.3