Subject Re: [IBO] KeyLinks/JoinLinks and RequestLive
Author rnagle@yahoo.com
--- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:
> When using a joined dataset, set the KeyRelation property to the
>name of the table which you wish to be affected by edits, inserts
>and deletes. If you want IBO to work out what the statements should
>be for these operations, set RequestLive to True. If you need
>custom SQL for these ops, enter it in the EditSQL, InsertSQL and
>DeleteSQL properties.
>
> Note: DO make certain that your KeyLinks contains all the columns
>necessary in both tables to uniquely identify a row.

I've tried this and everytime I try to edit the fields through data
aware controls I get the message 'Cannot edit current row'.

The SQL of my IBOQuery reads

SELECT R.RUNCODE /*pk for runs*/
, R.ACCOUNTCODE
, E.CODE /*pk for events*/
, E.DATETIME
, E.TITLE
, E.PRICE
FROM RUNS R
JOIN EVENTS E ON R.RUNCODE=E.RUNCODE

KeyLinks=RUNS.RUNCODE
EVENTS.CODE

KeyRelation=EVENTS

RequestLive=TRUE

What am I doing wrong?

Also is it possible to assign two seperate UPDATE SQL statements in
EditSQL so that I can update both the RUNS and EVENTS table.

Again, many thanks.