version 1.5
OC Set cursor option (login_ID; option_ID; option_Value) Longint
| Parameter | Type | Description | |
| login_ID | Longint | Login ID | |
| option_ID | Integer | Reference number for function | |
| option_Value | String | Value to set the option | |
| Function result | Longint | 1= The operation succeeds | |
| 0 = An error occurs | |||
| - 1 = option_ID is out of range |
Description
The OC Set cursor option function allows your application to set configuration information regarding a cursor.
cursor_ID must be the ID of a previously created cursor.
option_ID is the reference number for the requested option. A list of reference numbers follows the description of this routine.
option_Value is the value to which the option will be set.
The reference numbers for option_ID are as follows:
| Descriptor | ID |
| SQL_QUERY_TIMEOUT | 0 |
| SQL_MAX_ROWS | 1 |
| SQL_NOSCAN | 2 |
| SQL_MAX_LENGTH | 3 |
| SQL_ASYNC_ENABLE | 4 |
| SQL_BIND_TYPE | 5 |
| SQL_CURSOR_TYPE | 6 |
| SQL_CONCURRENCY | 7 |
| SQL_KEYSET_SIZE | 8 |
| SQL_ROWSET_SIZE | 9 |
| SQL_SIMULATE_CURSOR | 10 |
| SQL_RETRIEVE_DATA | 11 |
| SQL_USE_BOOKMARKS | 12 |
| SQL_GET_BOOKMARKS | 13 |
| SQL_ROW_NUMBER | 14 |
OC Set cursor option returns 1 if the operation succeeds, 0 if it fails, and -1 if option_ID is out of range.
Example
The following procedure sets the SQL_AUTOCOMMIT option (ID = 102) to manual (value = 0) and return the results in the $result variable.
$result:=OC Set cursor option(login;102;"0")
See Also