version 1.5
OP Use named selection (connectionID; tableID; selectionName) Longint
Parameter | Type | Description | |
connectionID | Longint | Connection ID with target server | |
tableID | Longint | Number of the table in the database | |
selectionName | String | Name of the selection | |
Function result | Longint | Error code result for the function |
Description
OP Use named selection makes selectionName the current selection. The table number is returned in tableID.
When you create a named selection, the current record is "remembered" by the named selection. OP Use named selection retrieves the position of the current record and makes it the new current record of the new current selection.
Like the current selection, a named selection does not contain actual recordsrather, it contains a list of references to the records. For this reason, if you delete or modify any of the records after you have created the named selection, the following may occur when you reuse the named selection:
Deleted records will appear as blank records in the new current selection,
Records added to the same table that have reused the space freed by deleted records may appear in the new current selection,
Modified records will appear modified in the new current selection.
If the named selection was originally copied, you can call OP Clear named selection to clear the named selection when you are done with it. If the named selection was originally cut, OP Use named selection automatically clears it.
Error Codes
If OP Use named selection executes successfully, it returns 0. Otherwise, this function returns one of the following errors:
Error Code | Description |
-9977 | The named selection does not exist. |
10128 | The 4D Open for 4th Dimension package has not been initialized. |
10136 | The connection does not exist. |
10154 | This command cannot be executed right now. |
Example
See the examples for OP Copy named selection and OP Cut named selection.
See Also
OP Clear named selection, OP Copy named selection, OP Cut named selection.