Here’s how to use open() functions.
Description:
Open an existing composite table file or a homo-name files group.
Syntax:
f.open(p)
Note:
The function opens an existing composite table file or a homo-name files group f. A write password is needed to update the file and a read password is only for the access. For a homo-name files group, each file must have same data structure and use same passwords. A missing member file in a files group means the corrreponding part of data is missing. Merge a patch file, if there is one, with the existing data when retrieving a member file.
Parameters:
f |
A composite table/homo-name files group |
p |
A password |
Return value:
An entity table
Example:
|
A |
|
1 |
=file("D:\\emp.ctx") |
|
2 |
=A1.open("123") |
Use the read password to open emp.ctx |
3 |
=file("emp1.ctx":[0,1,2]) |
The files named emp1.ctx in data zones 0, 1, and 2 have same structure and passwords |
4 |
=A3.open("456") |
Use the read password to open emp1.ctx |
5 |
=file("empTest.ctx") |
empTest.ctx has a patch file |
6 |
=A5.open("000") |
Merge the patch file into the composite file and and read the whole file |
7 |
=file("Score1.ctx",["192.168.0.104:8281"]) |
|
8 |
=A7.open("123!@#") |
Open the remote file Score1.ctx using the read password |
Description:
Open a cluster file.
Syntax:
f.open(p)
Note:
Then function opens cluster file f and generates a cluster able based on f.
Parameters:
f |
A cluster file;support only the composite table file |
p |
Password; can be absent |
Return value:
A cluster cursor
Example:
|
A |
|
1 |
=file("employee.ctx":[1],["192.168.0.104:8281"]) |
Open a cluster file |
2 |
=A1.open("11") |
Use the read password to open employee.ctx and generates a cluster table based on it |