Re: Lookup with multiple fields

be moelia <[email protected]> Thu, 21 Aug 2003 06:12:02 +0700
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
At 06:45 20/08/2003, you wrote:

>Are the fields separated by a semicolon?  Also, could you show how you
>are defining the properties?
>
>--
>Best regards,
>  Daniel Rail

Yes, the fields are separated by semicolon.
Here are what I am doing:

Table1 (main table) persistent fields: Field10, Field11, Field12, 
Field13(lookup field), Field14
all displayed on dbgrid1.

Table2 (lookup table) persistent fields: Field21, Field22, Field23.

Propertis of Field13
   object Table1Field13: TStringField
       FieldKind = fkLookup
       FieldName = 'Field13'
       KeyFields = 'Field11;Field12'
       LookupDataSet = Table2
       LookupKeyFields = 'Field21;Field22'
       LookupResultField = 'Field23'
       Size = 32
       Lookup = True
     end

I filled Table1 manually and found that lookup process work well,
Field13 column on dbgrid1 displaying correct data, but ..
when I clicked Field13 column on dbgrid1, BDE raised an exception
    'Table1: Field 'Field11;Field12' not found'

Pls give me a point.

regards,
-moelia-


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->

Delphi VCL Top Sites!
http://www.sandbrooksoftware.com/TS/TS2/Components.shtml
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/