OP Get all field numbers

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 all field numbers (connectionID; tableFields; tableIDs; fieldIDs) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with the server
tableFieldsArrayArray of field names in "[table]field" format
tableIDsArrayArray of table numbers in the database
fieldIDsArrayArray of field IDs in their tables
Function resultLongintError code result for the function

Description

OP Get all field numbers returns in tableIDs and in fieldIDs the table and field numbers for the names of the tables and fields you pass in tableFields.

tableFields must be an array of type Text or String. You must use the "[Table]Field" name format.

The table and field names are not case-sensitive.

tableIDs and fieldIDs must be arrays of type Integer or Longint or Real.

Error Codes

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

Error CodeDescription
-108Not enough memory to perform this operation.
-9981Invalid table/field number definition array sent.
10128The 4D Open for 4th Dimension package has not been initialized.
10135Invalid parameter type.
10136The connection does not exist.
10146Invalid field name(s).
10154This command cannot be executed right now.
10159The array(s) contain or will contain too many elements.

Example

In this example, the file and field numbers are returned for the fields passed in the aFldNames array:

   C_LONGINT($ErrCode)

   ARRAY LONGINT(aTables;6)
   ARRAY LONGINT(aFields;6)
   ARRAY STRING(15;aFldNames;6)

   aFldNames{1}:="[People]First Name"
   aFldNames{2}:="[People]Last Name"
   aFldNames{3}:="[Company]Address"
   aFldNames{4}:="[Company]City"
   aFldNames{5}:="[Company]ZIP"
   aFldNames{5}:="[Invoices]Amount"
   
   $ErrCode:=OP Get all field numbers (vConnectID;aFldNames;aTables;aFields)

See Also

Field, OP Count fields, OP Get fields properties, 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