Mytable Lookup with Multiple KeyFields
Posted: 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
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