SQLRetrieveItem$

Syntax

SQLRetrieveItem$(ConnectNum, Column, Row)

Remarks

Extracts an available data item from a data source. To use SQLRetrieveItem$, a macro must have already established a connection using SQLOpen. Also, a query must have already been executed using SQLExecQuery, and results must be pending.

You cannot use SQLRetrieveItem$ to return data from a SQLQueryExec instruction.

For a complete example macro using SQLRetrieveItem$ and the other functions used to retrieve information from a data source, see the second example macro described in "Using the ODBC Extensions" earlier in this appendix.

Argument

Explanation

ConnectNum

The unique connection ID for a data source. The data source specified must have pending query results. If ConnectNum is not valid, SQLExecQuery would have returned an error value. In such a case, SQLRetrieveItem$ places error information in memory for the error functions, if such information is available.

Column

The number of a column in the data source. Use SQLRetrieveColumns to determine the valid range of values. If the column value is out of range, SQLRetrieveItem$ returns an empty string ("").

Row

The number of a row in the data source. Use SQLRetrieveRows to determine the valid range of values. If the row value is out of range, SQLRetrieveItem$ returns an empty string ("").


SQLRetrieveItem$ returns the specified data item as a string.