ERROR in VirtualTable: incomplete lookup field information (error)

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kurdadze
Posts: 2
Joined: Sun 25 Sep 2005 08:36
Contact:

ERROR in VirtualTable: incomplete lookup field information (error)

Post by kurdadze » Sun 25 Sep 2005 09:01

Does anybody knows what do i have to fill except these fields:

LookupResultFields;
LookupKeyFields;
LookupDataSet;
KeyFields;
FieldKind=fkLookup

to make a new "lookup field" in VirtualTable? Even though all(!) fields excep necessary are filled, it gives me an error: The information is incomplete?

Does anybody knows the technology of making such lookup fields and can provide steb-by-step instructions?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 27 Sep 2005 08:05

Code: Select all

  object DBGrid1: TDBGrid
    Left = 224
    Top = 24
    Width = 529
    Height = 313
    DataSource = dsTable
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
  end
  object vtTable: TVirtualTable
    Active = True
    FieldDefs = 
    Left = 148
    Top = 120
    Data = {
      0200020004007674496403000000080076744469637449640300000000000300
      0000040000000100000004000000010000000400000002000000040000000100
      000004000000030000000400000002000000}
    object vtTablevtId: TIntegerField
      FieldName = 'vtId'
    end
    object vtTablevtDictId: TIntegerField
      FieldName = 'vtDictId'
    end
    object vtTableDictData: TStringField
      FieldKind = fkLookup
      FieldName = 'DictData'
      LookupDataSet = vtDict
      LookupKeyFields = 'vtDictId'
      LookupResultField = 'vtDictData'
      KeyFields = 'vtDictId'
      Lookup = True
    end
  end
  object vtDict: TVirtualTable
    Active = True
    FieldDefs = 
    Left = 180
    Top = 120
    Data = {
      0200020008007674446963744964030000000A00767444696374446174610100
      14000000030000000400000001000000030000003C313E040000000200000003
      0000003C323E0400000003000000030000003C333E}
  end
  object dsDict: TDataSource
    DataSet = vtDict
    Left = 180
    Top = 152
  end
  object dsTable: TDataSource
    DataSet = vtTable
    Left = 148
    Top = 152
  end

Post Reply