Previous Topic

Next Topic

OpenFileWithResourceXtd

Incremental ISAM open, based on the IFIL Resource (extended).

Short Name

OPNRFILX()

Type

Extended ISAM function

Declaration

COUNT OpenFileWithResourceXtd(COUNT filno, pTEXT filnam,
                              COUNT filmod, pTEXT fileword)

Description

OpenFileWithResourceXtd() is a variation of OpenFileWithResource() that permits the use of the c-tree Server’s security system. This section expands on the description of OpenFileWithResource().

fileword is an optional file password. Set fileword to NULL if there is no password for this file. If a password is established, every user will need to use the password to be able to open the file. For more information on file passwords, review Security and Encryption in the c-tree Plus Programmer’s Reference Guide.

Note: This function supports EXCLUSIVE file opens. For more information, please refer to Multi-user File Mode.

Return

OpenFileWithResourceXtd() returns the file number assigned to the data file. If an error occurs, the function returns a -1 and isam_err contains an error code. The following error codes may be seen in addition to those for OpenFileWithResource():

Value

Symbolic Constant

Explanation

456

SACS_ERR

This user does not belong to a group that can access this file.

457

SPWD_ERR

Invalid password.

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

See also

InitISAM(), CreateIFile(), OpenFileWithResource()