Subject Re: [IBO] Two editable and indexed columns from two tables
Author Gerard J.M.Houtenbos
I now have it working just fine using the following settings:

********************************************************
Main query:
SELECT players.p_key, players.name, players.captain_key,
captains.p_key, captains.name
FROM players
JOIN captains ON players.captain_key = captains.p_key

KeyRelation: players
KeyLinks: players.p_key
OrderingItems:
NAME=players.NAME;players.NAME DESC
CNAME=captains.NAME; DESC captains.NAME

Lookup query:
SELECT p_key, name
FROM captains
ORDER BY name

KeyLinks: captains.p_key

********************************************************
> >>>>>>>>>>> IF <<<<<<<<<<<<<<<<<<<<<<
>
>1. The Keylinks are correct. If you remove Captains.P_Key they are not
>correct...
>AND
>2. You set the KeyRelation to Players.
>
>Instead of *removing* Captains.P_Key from the KeyLinks, you need to try
>*adding* Players.CaptainKey. In this case you need to include the column
>in your select query. Make certain you are using fully-qualified
>identifiers throughout - in your SELECT and in all of the linker properties.

If I change the following in the mainquery:

KeyRelation: <blank>
KeyLinks:
players.p_key
captains.p_key
players.captain_key

then there is an exception when I edit a field with the message:
"Cannot edit current row"

********************************************************
>>When I set the KeyRelation property of the main-query to Players
>>and remove the 'Captains.P_Key' from the KeyLinks-property, then
>>the column Players.Name is editable.
>
>That doesn't solve your problem, though. Removing that column from the
>KeyLinks trashes your ability to implement the order linking.

I'm sorry, but it does. I can change the order to players.Name
and to captains.Name.

********************************************************
>Keep us posted with how you progress. It would be good if an experienced
>IBO/IB/Infopower user would step up and provide you with some tips about
>the control properties. At best, I'm flying blind, based only on knowledge
>of how the VCL controls behave. Infopower surely has some better tricks.
I'll wait for them patiently ....

>Unfortunately, you picked the wrong week to anticipate "many eyes" on your
>problem. I know of several of our experts who are away from their desks at
>the moment...
Too bad, that's my problem. I have to work.

Thanks,

Gerard

_________________________

Gerard J.M. Houtenbos
DoubleWood Software