PreviousActiveX Controls Guide (v10) Next

Btrv

Chapter contents

Applies to:

VAccess

Description

Performs a Pervasive PSQL operation on the file associated with the VAccess control and returns the status of the operation.

Syntax

object.Btrv opcode 
 

Part
Description
object
Required. The object placeholder represents an object expression that evaluates to an object in the Applies To list.
opcode
Required. Specifies the Pervasive PSQL operation to be performed.

Remarks

Any Pervasive PSQL function that can be performed by the VAccess control can be used by means of the Btrv method. The method takes a single parameter, the OpCode. OpCode constant declarations are included in the files 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 OpCode constants in your application.

Possible opcode settings are:

Code
Global Constant
Description
0
BTO_Open
Open the Pervasive PSQL table specified as the TableName of the VAccess control.
1
BTO_Close
Close the Pervasive PSQL table.
2
BTO_Insert
Insert the current record in the memory into the Pervasive PSQL table.
3
BTO_Update
Update the current record in the Pervasive PSQL table with the data contained current record in memory.
4
BTO_Delete
Delete the current record from the file.
5
BTO_GetEqual
Retrieves the first record with an index value equal to the FieldValue specified.
6
BTO_GetNext
Retrieves the next record in the current index path.
7
BTO_GetPrevious
Retrieves the previous record in the current index path.
8
BTO_GetGreater
Retrieves the record with an index value that is greater than that of the FieldValue specified.
9
BTO_GetGreaterOrEqual
Retrieves the record with an index value that is greater than or equal to that of the FieldValue specified.
10
BTO_GetLess
Retrieves the record with an index value that is less than that of the FieldValue specified.
11
BTO_GetLessOrEqual
Retrieves the record with an index value that is less than or equal to that of the FieldValue specified.
12
BTO_GetFirst
Retrieves the first record in the current index path.
13
BTO_GetLast
Retrieves the last record in the current index path.
22
BTO_GetPosition
Places the physical position of the current record within the Pervasive PSQL file into the Position property of the VAccess control.
23
BTO_GetDirect
Retrieves the record specified in the Position property of the VAccess control.
24
BTO_StepNext
Retrieves a record from the VAccess from the location physically following the current record.
30
BTO_ClearOwner
Clears the current Owner Name security for the file. Note: the file must first be opened with the existing owner name.
33
BTO_StepFirst
Retrieves the record in the first physical location of the file.
34
BTO_StepLast
Retrieves the record in the last physical location of the file.
35
BTO_StepPrevious
Retrieves a record from the VAccess from the location physically preceding the current record.

You may lock records in Pervasive PSQL by adding a lock bias to the operation code. With Btrv, you may specify a lock on any Get or Step operation. Use the Unlock method to remove locks. The lock biases are:

Lock Bias
Global Constant
Description
200
BTO_SingleNoWait
Single Record No-Wait Lock. When the record is already locked, Pervasive PSQL will return Status Code 84, Record In Use error to the application.
400
BTO_MultiNoWait
Multiple Record No-Wait Lock. When the record is already locked, Pervasive PSQL will return a Status Code 84, Record In Use error to the application.

Example

If Check1.Value = 1 Then 
	stat = VAccess1.Btrv(5) 'GetEqual 
Else 
	stat = VAccess1.Btrv(9) 'GetGreaterOrEqual
End If 

Chapter contents
Book contents

Prev topic: AddItem
Next topic: Clear