OP Count tables

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 Count tables (connectionID; numOfTables) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with target server
numOfTablesLongintNumber of tables in server database
Function resultLongintError code result for the function

Description

OP Count tables returns in numOfTables the number of tables in the 4D Server database to which you have connected.

Error Codes

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

Error CodeDescription
10128The 4D Open for 4th Dimension package has not been initialized.
10136The connection does not exist.
10154This command cannot be executed right now.

Example

This example returns the number of files in the database. Then it uses this number to find the number of fields in each file.

   C_LONGINT($i;vFileNum;vFieldNum)

   `… connect to a server

   $ErrCode:=OP Count tables($ConnectID;vFileNum)

   ARRAY STRING(15;aFieldNum;vFileNum)

   For($i;1;vFileNum)
      $ErrCode:=OP Count fields($ConnectID;$i;vFieldNum)
      aNumFields{$i}:=vFieldNum
   End for

See Also

Count tables, OP Count fields.


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