version 1.5
OP Count tables (connectionID; numOfTables) Longint
Parameter | Type | Description | |
connectionID | Longint | Connection ID with target server | |
numOfTables | Longint | Number of tables in server database | |
Function result | Longint | Error 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 Code | Description |
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
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.