brRelease method

For clsD3Connection Objects - releases all locks associated with the clsD3Connection object. For clsD3File Objects - releases an item lock on the specified item of the D3 file associated with the clsD3File object that was previously set using the brReadU or brReadVU methods.

Syntax

oConn. brRelease
oFile.brRelease sItemId

Parameters

Parameter Description
oConn An object variable that represents a clsD3Connection object.
oFile An object variable that represents a clsD3File object.
sItemId A String specifying the item-id of the item to be unlocked.

Example

Sub Main()
   Dim oEnv As New clsD3Environment
   Dim oConn As clsD3Connection
   Dim oFile As clsD3File
   Dim oArray As clsD3DynamicArray
   Dim lName As Long
   Dim lTitle As Long
 
   Set oConn = oEnv.brOpenConnection("ODBC;", "Production") 
 
   ' Open the file.
   Set oFile = oConn.brOpenFile("Customers")
 
   ' Resolve attribute names.
   lName = oFile.brColumn("contactname")
   lTitle = oFile.brColumn("contacttitle")
 
   ' Read the record for customer "13".
   Set oArray = oFile.brReadU("13")
 
   ' Change the attributes in the dynamic array.
   oArray.brReplaceStr "Bob Smith", lName
   oArray.brReplaceStr "Vice President", lTitle
 
   ' Write the record back.
   oFile.brWriteU oArray, "13"
 
   ...
 
   oFile.brRelease“13”
   oConn.brCloseFile oFile
   oEnv.brCloseConnection oConn
   Set oEnv = Nothing
End Sub

FlashBASIC reference

release