AdsVerifySQL

Advantage Client Engine

 

Verifies the validity of an SQL statement without executing it

Syntax

UNSIGNED32

AdsVerifySQL( ADSHANDLE hStatement,

UNSIGNED8 *pucSQL )

Parameters

hStatement (I)

Handle of an SQL statement created by a call to AdsCreateSQLStatement.

pucSQL (I)

The SQL statement given as a null terminated string.

Remarks

AdsVerifySQL is useful to call prior to executing a time consuming SQL statement or to test a dynamically created SQL statement.

Example

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 );

 

See Also

AdsPrepareSQL

AdsExecuteSQL

AdsExecuteSQLDirect