Subject RE: [IBO] Join edit
Author Dion
Hi All,

What I want to do is present a GUI which to the user seems to be one table.
When the user inserts into the "main" table, the joined table is also
updated(either inserted into if the key field is not found, or updated if
any edits where done to the joined table as a whole). All fields from both
tables must be editable in for eg a grid. How is this accomplished?

Many Thanks,
Dion.



-----Original Message-----
From: Helen Borrie (TeamIBO) [mailto:helebor@...]
Sent: Monday, January 14, 2002 5:50 AM
To: IBObjects@...
Subject: Re: [IBO] Join edit


At 03:19 PM 14-01-02 -0800, Dion wrote:
>Hi,
>
>How do you fool the dataset into letting you edit a joined query?

1. Choose which underlying table is to receive the edits and enter its
identifier into KeyRelation.
2. Make quite certain that your KeyLinks uniquely identify a row.

If you need to update more than one table in the query, you will need a
parameterised stored procedure. It is not possible under SQL rules to
update more than one table in a single UPDATE statement, which is what you
get with the standard methods. In that case, you will have to override the
standard Edit behaviour and make a call to your SP your EditSQL property.
(Same goes with InsertSQL and DeleteSQL).

Also, if you are using SQL-89 join syntax, you MUST define your JoinLinks.
If you are using SQL-92 (..JOIN...ON..) then ignore JoinLinks.


regards,
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
www.ibobjects.com



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/