version 1.5
OP Max (connectionID; tableID; fieldID; result) Longint
Parameter | Type | Description | |
connectionID | Longint | Connection ID with target server | |
tableID | Longint | Number of the table in the database | |
fieldID | Longint | Number of the field in the table | |
result | Variable | Maximum value in field for the current selection | |
Function result | Longint | Error code result for the function |
Description
OP Max returns the largest of all the values for fieldID in the current selection in result. If fieldID is an indexed field, the index is used to find the largest value (i.e., the response time is shorter).
Error Codes
If OP Max executes successfully, it returns 0. Otherwise, this function returns one of the following errors:
Error Code | Description |
-9969 | Invalid field type requested (field type is not Longint, Integer, Time or Real). |
-9971 | Field number is out of range. |
-9972 | Table number is out of range. |
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. |
Examples
See example for OP Sum.
See Also