SetOwner
Applies to
VAccess
Description
The
SetOwner
method is used to specify an owner name for a PSQL table to restrict access to the table.
Syntax
object
.
SetOwner
(OwnerName, SecurityLevel)
The syntax for this method has the following parts:
Part
Description
object
Required. The object placeholder represents an object expression that evaluates to an object in the Applies To list.
OwnerName
the owner name to assign to the table
SecurityLevel
integer representing a security level
Remarks
The following Security Level codes may be passed to
SetOwner
in the
SecurityLevel
parameter:
Code
Global Constant
Description
0
EXCLUSIVE
Does not allow the file to be opened unless the correct owner name is specified.
1
READONLY
Permits users who do not specify an owner name to view, but not to modify the table.
2
EXCLUSIVE_ENCRYPT
Does not allow the file to be opened unless the correct owner name is specified. Data is encrypted within the file.
3
READONLY_ENCRYPT
Permits users who do not specify an owner name to view, but not to modify the table. Data is encrypted within the file.
Constant declarations are included in the files GLOBAL.BAS (for 16 bit Visual Basic), GLOBAL.BAS (for Visual Basic), GLOBAL.PAS (for Delphi), and GLOBAL.H (for Visual C++). Include one of these files (whichever is appropriate for your development environment) in your project to use the Security Level constants in your application.
To remove the owner name from a PSQL table, first open the table with the owner name, then issue a BTO_ClearOwner operation to the
Btrv
method.
This value will not affect the owner name used to access dictionary files. Use
DdfSetOwner
to change the owner name of a set of dictionary files.
See Also
OwnerName, DdfSetOwner, DdfTestOwnerName