PreviousActiveX Controls Guide (v10) Next

SetOwner

Chapter contents

Applies to:

VAccess

Description

The SetOwner method is used to specify an owner name for a Pervasive PSQL table to restrict access to the table.

Syntax

object.SetOwner(OwnerName, SecurityLevel) 
 

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 Pervasive 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


Chapter contents
Book contents

Prev topic: SetFileFlag
Next topic: ShowSelectedFieldsDlg