OP Get one field number

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 Get one field number (connectionID; tableField; tableID; fieldID) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with target server
tableFieldStringName of the field in "[table]field" format
tableIDLongintNumber of the table in the database
fieldIDLongintNumber of the field in the table
Function resultLongintError code result for the function

Description

OP Get one field number returns tableID and fieldID for [TableName]fieldName passed in tableField. The table and field name are not case-sensitive.

Error Codes

If OP Get one field number executes successfully, it returns 0. Otherwise, this function returns one of the following errors:

Error CodeDescription
-108Not enough memory to perform this operation.
-9972File number is out of range.
-9981Invalid table/field number definition array sent.
10128The 4D Open for 4th Dimension package has not been initialized.
10136The connection does not exist.
10146Invalid field name(s).
10154This command cannot be executed right now.

Example

In this example, the file and field number are returned for the "[Customer]Full name" field:

   C_LONGINT($ErrCode;vTable;vField)
   
   $ErrCode:=OP Get one field number (vConnectID;"[Customer]Full Name";vTable;vField)
   If ($ErrCode=0)
      ALERT("Table number: "+String(vTable)+Char(13)+"Field number: "+String(vField))
   End if

See Also

Field, OP Get all field numbers, OP Get fields properties.


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