version 1.5
OP All records (connectionID; tableID) Longint
Parameter | Type | Description | |
connectionID | Longint | Connection ID with target server | |
tableID | Longint | Table ID in the database | |
Function result | Longint | Error code result for the function |
Description
OP All records selects all the records in table tableID. The new current selection contains all the records of tableID that were there when the command was executed.
Error Codes
If OP All records executes successfully, it returns 0. Otherwise, this function returns one of the following errors:
Error Code | Description |
-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. |
Example
C_LONGINT ($errCode;$nbHours) UserSelectInvoices `Display a dialog that let the user specify criteria Case of :( userClickedQuery= 1) ` User clicked on 'query' button UserQueryRun ` Perform the query specified by the user :( userClickedCancel=1) `User cancels query request $errCode:= OP Reduce selection (vConnectID;vTableID;0) :( userClickedAllInvoices=1) `User chose to process all invoices $errCode:=OP All records (vConnectID;vTableID) End case ` Get number of records in the table $errCode:=OP Records in selection (vConnectID;vTableID;vRecords) ` Compute average time to process user selection $nbHours:=vRecords*<>avgTimePerRecord If ($nbHours > 8) ` If more than eight hours to process, get user's OK CONFIRM ("This operation will take more than eight hours"+Char (13)+ "Proceed ?") If (OK=1) processInvoices End if End if
See Also
ALL RECORDS, OP Records in selection, OP Records in table, OP Reduce selection, OP Single query.