TrkTable.ReadDB (method)

method ReadDB
Syntax: object.ReadDB bstrItemID
bstrItemID As String -
Item ID. This is an optional parameter. CIMPLICITY wildcard characters "*" and "?" are allowed. For lookup tables, this parameter has no meaning.
Reads the source data from the database and loads the Records collection. If the parameter is not specified it will load all records. If the parameter is not empty, it will load the record(s) matching the search pattern. If no matching records are found in the database, then the collection will be empty.


Dim oTADBRoot As Object
Dim oTrkTable As Object
Dim idx As Long

Set oTADBRoot = CreateObject("TADB.TADBRoot")

If oTADBRoot Is Nothing Then
   MsgBox "Root Object is not created"
End If

oTADBRoot.Load "TRK7", ""

For idx = 1 to oTADBRoot.TrkTables.Count
   Set oTrkTable = oTADBRoot.TrkTables.Item(idx)
   If Not oTrkTable Is Nothing Then
      'This will load all records in the table
      'OR use one of the following lines to load specific record or set of records.
      ' oTADBRoot.TrkTables.ReadDB "Item2"
      ' oTADBRoot.TrkTables.ReadDB "I*"
    'Table does not exist....
   End If