version 1.5
OC Activate context (login_ID; context_ID) Integer
| Parameter | Type | Description | |
| login_ID | Longint | Connection ID | |
| context_ID | Longint | Context ID | |
| Function result | Integer | 1 = the operation is successful, | |
| -1 = an error occurs |
Description
The OC Activate context function activates a context created by OC Create context, OC Create context dialog, or by loading a picture or file containing the context definition.
login_ID must be a valid connection ID.
context_ID must be a previously created and inactive context ID.
OC Activate context returns -1 if an error occurs. Otherwise it returns 1.
OC Activate context creates a cursor and defines the set of rows that corresponds to the result of the query. It does not retrieve any result rows. To display result rows, use OC Load rows context and OC Previous in context. You can use OC Load rows context to retrieve the first row of the results.
As long as the context is active, you cannot modify its definition using OC ADD TO CONTEXT, OC EDIT CLAUSES IN CONTEXT or OC SET CLAUSE IN CONTEXT.
A context remains active until you deactivate it by calling OC DEACTIVATE CONTEXT.
See Also
OC Create context, OC DEACTIVATE CONTEXT, OC Load rows context, OC Previous in context.