Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.14 KB

SQLExecDirect.md

File metadata and controls

54 lines (38 loc) · 1.14 KB

Home

Function name : SQLExecDirect

Group: ODBC API - Library: odbc32


SQLExecDirect executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement.


Code examples:

How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement

Declaration:

SQLRETURN SQLExecDirect(
	SQLHSTMT   StatementHandle,
	SQLCHAR *  StatementText,
	SQLINTEGER TextLength);  

FoxPro declaration:

DECLARE SHORT SQLExecDirect IN odbc32;
	INTEGER StmtHandle,;
	STRING  StmtText,;
	INTEGER TextLen
  

Parameters:

StatementHandle [Input] Statement handle.

StatementText [Input] SQL statement to be executed.

TextLength [Input] Length of *StatementText.


Return value:

SQL_SUCCESS (0), SQL_SUCCESS_WITH_INFO (1), or an error code: SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, SQL_INVALID_HANDLE.