11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SQLFetch<br />

Syntax<br />

status = SQLFetch (statement.env)<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 />

Use this function to retrieve the next row’s column values from the result set at the<br />

data source and put them into the variables specified with SQLBindCol. SQLFetch<br />

performs any required data conversions.<br />

SQLFetch returns SQL.SUCCESS.WITH.INFO if numeric data is truncated or<br />

rounded when converting SQL values to UniData values.<br />

SQLFetch logically advances the cursor to the next row in the result set. Unbound<br />

columns are ignored and are not available to the application. When no more rows are<br />

available, SQLFetch returns a status of 100 (SQL.NO.DATA.FOUND).<br />

Your application must issue an SQLFetch call at the same transaction nesting level<br />

(or deeper) as the corresponding SQLExecDirect or SQLExecute call. Also, an<br />

SQLFetch call must be executed at the same transaction isolation level as the<br />

SELECT statement that generates the data. If it does not, SQLFetch returns<br />

SQL.ERROR and sets SQLSTATE to S1000.<br />

Use SQLFetch only when a result set is pending at the data source.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

statement.env SQL statement environment of the executed SQL statement.<br />

SQLFetch Parameters<br />

SQLFetch 1-815

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

Saved successfully!

Ooh no, something went wrong!