brColumn method

Returns the attribute number of the specified attribute-defining item of the D3 file associated with the clsD3File object.

Syntax

lValue = object.brColumn(sName)

Parameters

Parameter Description
lValue The return value is a Long data type indicating the attribute number.
object An object variable that represents a clsD3File object.
sName A String that specifies the attribute-defining item.

Remarks

If the requested attribute-defining item is not found in the D3 file, the method raises the exception d3SrvErr_BadCol.

The brAttribute method and brColumn method return the same results.

Example

Sub Main()
   Dim oEnv As New clsD3Environment
   Dim oConn As clsD3Connection
   Dim oFile As clsD3File
   Dim oDynArray 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 oDynArray = oFile.brReadU("13")
   ’ Change the attributes in the dynamic array
   oDynArray.brReplaceStr "Al Gore", lName
   oDynArray.brReplaceStr "Vice President", lTitle
 
   ’Write the record back
   oFile.brWrite oDynArray, "13"
 
   oConn.brCloseFile oFile
   oEnv.brCloseConnection oConn
End Sub

Applies to

clsD3File class