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.brAttribute("contactname") lTitle = oFile.brAttribute("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 |