OP Goto record

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


OP Goto record (connectionID; tableID; recordNumber; bindID; lockStatus) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with target server
tableIDLongintNumber of the table in the database
recordNumberLongintAbsolute record number in the table
bindIDLongintBind list ID
lockStatusLongintLock status = 1 means the record is locked
Function resultLongintError code result for the function

Description

OP Goto record makes recordNumber the current and only record in the selection.

If you pass 0 in bindID or omit the last two parameters, OP Goto record changes only the current record pointer. If you pass a valid bind list ID, the routine will also download the fields accordingly. In this case, if the access mode to the table is read/write, the routine will additionally try to give you access to the record in read/write mode. If this last operation is successful, the routine returns 0 in lockStatus. If the record is already in use by another process, the routine returns 1 in lockStatus.

By testing the lockStatus parameter, you know whether or not you can subsequently modify or delete the record using OP Update record or OP Delete record.

If you obtained the current record in read/write mode, you must release the record for the other processes by using OP Unload record once you are done with the record (unless you deleted it).

Error Codes

If OP Goto record executes successfully, it returns 0. Otherwise, this function returns one of the following errors:

Error CodeDescription
-9972Table number is out of range.
-10003Record is out of range.
10128The 4D Open for 4th Dimension package has not been initialized.
10136The connection does not exist.
10154This command cannot be executed right now.

Example

See example for OP Delete record.

See Also

GOTO RECORD, OP Current Record Number, OP Delete record, OP Get record numbers, OP Goto selected record, OP Load record, OP Single query.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next