Subject Re: [IBO] When is KeyRelation necessary?
Author Helen Borrie (TeamIBO)
At 12:02 PM 12-03-02 +0100, Nando Dessena wrote:
>I am using a TIBOQuery with a somewhat complex SQL statement (a left
>join and a "where exists" clause). The dataset is not editable unless I
>set KeyRelation. I thought that it was required when using implicit join
>syntax only, while I am using explicit syntax.

You are getting confused with JoinLinks, I think.

>Does anyone have a definitive reference on when is KeyRelation

"Necessary" - not at all. But it can be used to set the (one) table in the
joined dataset that can be updated by the standard Insert, Edit and Delete
behaviours. It's not useful if you need to update multiple tables - in
that case you would not use KeyRelation, but would call stored procs by way
of you custom SQL props (InsertSQL, etc.)

>The query is something like that:
>select a.*,
>from a left join b on ( =
>where exists (select from some_stored_procedure(:a_param) s where
> =
>order by
>I have set KeyLinks to '', and thought that would be enough.
>Setting KeyRelation to 'a' does work well, so it's not really an issue
>for me, just a curiosity.

What does it *do* when it "works well"?

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at