GETVARBINARY Method
Returns the designated result set column as type VARBINARY.
| Restriction: | This method is not supported on the CAS server. |
|---|---|
| Note: | You can call the GETVARBINARY method repeatedly to return the result set column data. When all data has been retrieved, a value of 2 (NODATA) is returned for the rc status indicator. |
Table of Contents
Syntax
Required Arguments
variable
specifies the variable that will hold the value of the designated result set column.
| Note | If the designated result set column’s type is not type VARBINARY, the column value is converted to type VARBINARY and then returned. |
|---|
package
specifies an instance of the SQLSTMT package.
index
specifies the result set column index ordered sequentially, starting at 1.
rc
specifies the variable in which to place the return code. The following values are possible:
0
(SUCCESS) the result set column data is retrieved.
1
(ERROR) an error occurred during data retrieval.
2
(NODATA) there is no more data to be retrieved.
Details
The FETCH method returns the next row of data from the result set. If variables are not bound to the result set columns, the fetched data can be returned by the GETtype methods.
The GETVARBINARY method returns the value of the designated result set column as type VARBINARY. If the designated result set column’s type is not type VARBINARY, the column value is converted to type VARBINARY and then returned.
A run-time error results if the GETVARBINARY method is called before the result set is fetched.
The result set must be accessed exclusively with bound variables or exclusively with the GETtype methods. A run-time error results if variables are bound to result set columns and a GETtype method is invoked.
For more information, see Accessing Result Set Data in SAS DS2 Programmer’s Guide.
See Also
-
Using the SQLSTMT Package in SAS DS2 Programmer’s Guide
-
Methods: