Causes a RecordRef variable to refer to a table which is
identified by its number in a particular company.
|
RecordRef.OPEN(No[, Temp][, CompanyName])
|
Parameters
- RecordRef
-
Type: RecordRef
- No
-
Type: Integer
The number of the table.
- Temp
-
Type: Boolean
- CompanyName
-
Type: Text or code
The name of the company to which you want to change. If you omit
this parameter, the current company is used.
Remarks
Example
This example shows how to use the OPEN function.
|
Copy Code |
recordref.OPEN(DATABASE::Customer);
message('The %1 table contains %2 records;
recordref.CAPTION, recordref.COUNTAPPROX);
|
This example shows how to use the OPEN function. In
this example, "MyRecordRef" opens table 27 and then "FIND('-')"
finds the first record in the table. "TempMyRecordRef" opens a
temporary table which is empty and therefore the "FIND('-')"
returns false.
|
Copy Code |
MyRecordRef.OPEN(27,FALSE);
TempMyRecordRef.OPEN(27,TRUE);
IF MyRecordRef.FIND('-') THEN // This is true and will find the first record in the table.
MESSAGE('MyRecordRef finds')
ELSE
MESSAGE('MyRecordRef does not find');
IF TempMyRecordRef.FIND('-') THEN // This is false because there are no records in a temporary table.
MESSAGE('TempMyRecordRef finds')
ELSE
MESSAGE('TempMyRecordRef does not find');
|
See Also