Subject Re: [IBO] Possible BDE/DBase -> FB 1.5/IBO Migration(Noob Questions Inside)
Author Helen Borrie
At 09:36 AM 31/08/2005 +0200, you wrote:
>hello Helen,
>
> > You DO need a SP to make your joined set updatable
>
>just a curiosity: Is a SP really needed in this case or is it enough to fill
>the various XXXXSQL properties of the IB_Query? Isn't it the same in this
>case? I know that a IB_Query supplied with the XXXXSQL properties can update
>joined sets. So why a SP if the statement has to update only one table?

The rule of thumb for updates and deletes is whether a row in the target
table can be uniquely identified by the KeyLinks. So, if the KeyLinks in
the set cannot identify one and only one row in the target table, you have
potentially a "multiple rows" situation and the DSQL statement would fail.

For inserts, the situation might be simpler. If your InsertSQL can supply
all of the required values for an insert, it can be done.

However, I think that Richard's situation was that he wanted to insert rows
to multiple tables. Where any DML has to affect multiple tables, an SP
that can get the required inputs from the set and independently work on the
tables and rows is the only option.

Helen