Subject Re: [IBO] Editing Joins
Author Helen Borrie (TeamIBO)
At 02:01 AM 10-08-02 -0300, you wrote:
>I want to better know the benefits of using IBO in future projects.
>
>Is there a simple way to edit joined tables, allowing to edit fields that
>belong to distinct tables?

Yes indeed, IBO offers plenty of scope for making joined datasets live and
editable.

1) For any dataset output from a join, you can make the columns of one
table editable by specifying that table as the KeyRelation property of the
dataset.

2) If you need columns from more than one table to be editable, then the
xxxxSQL properties (Edit..., Insert..., Delete...) provide the capability
to invoke the respective custom DML operations via parameterised stored
procedures. If you write these SP's to accept as input arguments the
values of key fields, that are present in the joined dataset, IBO will
handle this transparently for you. For example, the InsertSQL property is
usually as simple as

'EXECUTE PROCEDURE MyInsertProc(:Key1, :Key2)'

Provided Key1 and Key2 are columns in your dataset, when you call Insert on
the selected row, IBO will apply that row's Key1 and Key2 values to the
InsertSQL and execute the statement.

In the database, you will have designed MyInsertProc to perform all the
checking and inserts necessary to insert into and/or update the tables
underlying the dataset.

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