11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SQLExecDirect<br />

Syntax<br />

status = SQLExecDirect (statement.env, statement)<br />

Note: This function is case-sensitive. If you want it to be case-insensitive, you<br />

must compile your programs using the BASIC command with the -i option.<br />

Description<br />

SQLExecDirect accepts an SQL statement or procedure call and delivers it to the<br />

data source for execution. It uses the current values of any SQL statement parameter<br />

markers.<br />

SQLExecDirect differs from SQLExecute in that it does not require a call to<br />

SQLPrepare. SQLExecDirect prepares the SQL statement or procedure call<br />

implicitly. Use SQLExecDirect when you do not need to execute the same SQL<br />

statement or procedure repeatedly.<br />

You can use parameter markers in the SQL statement or procedure call as long as you<br />

have resolved each marker with an SQLBindParameter call.<br />

After an SQLExecDirect call you can use SQLNumResultCols, SQLDescribeCol,<br />

SQLRowCount, or SQLColAttributes to get information about the resulting<br />

columns. You can use SQLNumResultCols to determine if the SQL statement or<br />

procedure call created a result set.<br />

If the executed SQL statement or procedure produces a set of results, you must use<br />

an SQLFreeStmt call with the SQL.CLOSE option before you execute another SQL<br />

statement or procedure call using the same SQL statement environment. The<br />

SQL.CLOSE option cancels any pending results still waiting at the data source.<br />

1-810 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!