PreviousActiveX Controls Guide (v10) Next

DdfSetOwner

Chapter contents

Applies to:

VAccess

Description

Can be used to set the Btrieve owner name for the dictionary files to something other than the default owner name (..SC....) and security level (allow read-only access). Owner name and security level parameters follow Btrieve conventions.

Syntax

void DdfSetOwner(BSTR newOwnerName, short securityLevel)

Example

Private Function SetDDFOwner(newOwner as String, _ 
	securityLevel as Integer) as Integer 
	'We must have confirmation to continue 
	VAEngine.RefreshLocations = True 
	'write this to 'DDF's 
	If Len(newOwner) = 0 Then 
		'Set to default DDF owner name 
		status = VAEngine.DdfSetOwner("..SC....", 1) 
	Else 
		'Do what they asked 
		status = VAEngine.DdfSetOwner(newOwner, _ 
			securityLevel) 
	End If 
	If status = 0 Then 
		msg = "DDF Password has been successfully" _ 
			& " changed." 
		MsgBox msg, vbInformation			 
	Else 
		msg = " Btrieve returned status " + _ 
			CStr(status) + "." 
		MsgBox msg, vbExclamation 
	End If 
End Function 

Chapter contents
Book contents

Prev topic: DdfModifyTableName
Next topic: DdfTestOwnerName