Subject | Re: [IBO] Multiple SQL Statements in Edit-/Insert-/DeleteSQL |
---|---|
Author | Daniel Albuschat |
Post date | 2004-07-12T14:04:13Z |
On Mon, Jul 12, 2004 at 11:44:21PM +1000, Helen Borrie wrote:
single DML Statement?
update-statements which are executed by ibobjects when necessary?
And having two tables linked to each other definitely is
not against database rules...
dataset in OnCustomInsert, can't I?
Thanks for your answer,
Daniel Albuschat
--
eat(this); // delicious suicide
> At 03:23 PM 12/07/2004 +0200, you wrote:--8<------
> >Hello,
> >
> > is it possible to have multiple SQL statements in the Edit-, Insert- or
> >Delete SQL fields in a TIB_Query?
>But do these SQL-Statements need to be treated as a
> A DML statement can operate on one and only one table.
single DML Statement?
> >and I don't want to add a stored procedure for this moreWouldn't it be nice to just have 2 (or n, for that matter)
> >or less trivial task.
>
> Updating two tables is not a trivial task. If you have to update both
> tables, you have no option other than a stored procedure (which, itself,
> can be quite trivial).
update-statements which are executed by ibobjects when necessary?
> >I can't use the BeforeInsert event, because bar dependsWhat do you mean? I can't do what?
> >on foo (foreign key set).
> >And I can't use AfterInsert because I'd have to Refresh the
> >data after I've done the insert.
>
> You simply can't do it, period. It's against database rules.
And having two tables linked to each other definitely is
not against database rules...
> >OnCustomInsert would work,I can do whatever is necessary to insert the
>
> Not. OnCustomInsert refers to a custom InsertSQL operation: inserting a
> row of data into a single table using your own parameter assignments; or
> calling a parameterised stored procedure.
dataset in OnCustomInsert, can't I?
> >but the InsertSQL is less to type and maintain, IMHO.Except for the stored procedure...
>
> It certainly is; and, if you are careful with the names you give to the
> input parameters, you won't have to code anything.
Thanks for your answer,
Daniel Albuschat
--
eat(this); // delicious suicide