Advantage Client Engine
Verifies the validity of an SQL statement without executing it
UNSIGNED32 |
AdsVerifySQL( ADSHANDLE hStatement, UNSIGNED8 *pucSQL ) |
hStatement (I) |
Handle of an SQL statement created by a call to AdsCreateSQLStatement. |
pucSQL (I) |
The SQL statement given as a null terminated string. |
AdsVerifySQL is useful to call prior to executing a time consuming SQL statement or to test a dynamically created SQL statement.
ulRetVal = AdsVerifySQL( hStatement, "SELECT * FROM demo10");
if ( ulRetVal != AE_SUCCESS )
{
/* some kind of error, tell the user what happened */
AdsShowError( "Invalid SQL statement" );
return ulRetVal;
}
ulRetVal = AdsExecute( hSQL, &hCursor );