UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

SQLRowCount Syntax status = SQLRowCount (statement.env, rows) Note: This function is case-sensitive. If you want it to be case-insensitive, you must compile your programs using the BASIC command with the -i option. Description SQLRowCount returns the number of rows changed by UPDATE, INSERT, or DELETE statements, or by a called procedure that executes one of these statements. Statements such as GRANT and CREATE TABLE, which do not update rows in the database, return 0 in rows. For a SELECT statement, a 0 row count is always returned, unless the SELECT statement includes the TO SLIST clause. In that case, SQLRowCount returns the number of rows in the select list. The value of rows returned after executing a stored procedure at the data source may not be accurate. It is accurate for a single UPDATE, INSERT, or DELETE statement. Parameters The following table describes each parameter of the syntax. Input Variable Description 1-844 UniBasic Commands Reference statement.env SQL statement environment containing the executed SQL statement. rows Number of rows affected by the operation. SQLRowCount Parameters

Return Values The following table describes the return values of the SQLRowCount function. Return Value Description 0 SQL.SUCCESS −1 SQL.ERROR −2 SQL.INVALID.HANDLE SQLRowCount Return Values SQLRowCount 1-845

SQLRowCount<br />

Syntax<br />

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

SQLRowCount returns the number of rows changed by UPDATE, INSERT, or<br />

DELETE statements, or by a called procedure that executes one of these statements.<br />

Statements such as GRANT and CREATE TABLE, which do not update rows in the<br />

database, return 0 in rows.<br />

For a SELECT statement, a 0 row count is always returned, unless the SELECT<br />

statement includes the TO SLIST clause. In that case, SQLRowCount returns the<br />

number of rows in the select list.<br />

The value of rows returned after executing a stored procedure at the data source may<br />

not be accurate. It is accurate for a single UPDATE, INSERT, or DELETE statement.<br />

Parameters<br />

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

Input Variable Description<br />

1-844 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

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

rows Number of rows affected by the operation.<br />

SQLRowCount Parameters

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

Saved successfully!

Ooh no, something went wrong!