Mytable Lookup with Multiple KeyFields

Mytable Lookup with Multiple KeyFields

Postby Guest » Fri 26 Nov 2004 11:35

Hi,

I have a MyTable and have created several Lookup fields into sub-tables that work fine. Now, I've tried to created a lookup into a table that uses several fields as a key and it doesn't work.
In the main table,
KeyFields=switch;port
LookupUpdataSet=taPort (this is a MyTable)
LookupKeyFields=switch;name
LookupResultField=location

All fields are strings, in the taPort table, the columns switch and name provide the key. In the main table I want to use the combination of switch and port as the key into taPort.

Does MyTable support this or do I have an error?
I use 3.30.0.12 on D7

Another little question: I keep leaving my DB connected at design time, which gives errors when running in production (different DBs are used). Is there an event I can hang into somewhere that Sets MyConnection1.Connect:=false somewhere on startup early on?

Thanks in advance,

Sean
Guest
 

Re: Mytable Lookup with Multiple KeyFields

Postby Ikar » Mon 29 Nov 2004 12:03

> Does MyTable support this or do I have an error?

We checked MyDAC and couldn't reproduce the problem. Please contact us by email and we'll send you this sample by email.

Is it possible that some of these fields are Int64 (BIGINT)? Delphi doesn't support Lookup by such fields.

> Is there an event I can hang into somewhere that Sets
> MyConnection1.Connect:=false somewhere on startup early on?

Pay attention to MyConnection.Options.KeepDesignConnected property. But an error in this property was found in version 3.30.0.12 and you should use 3.30.1.13.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby sean » Mon 29 Nov 2004 23:27

The Multiple key fields are working fine for me today, I must have been hallucinating, sorry.

MyConnection.Options.KeepDesignConnected is a great tip THANKS.

Sean
sean
 


Return to MySQL Data Access Components