Subject Re: [IBO] InsertSQL question
Author ehandbury
--- In IBObjects@y..., "Helen Borrie (TeamIBO)" <helebor@d...> wrote:
> At 03:04 PM 05-03-02 +1100, Eric Handbury wrote:
> >Hello,
> >
> > I have a dataset where the user will use the TIB_UpdateBar to
> >edit/insert/delete records.
> > The edit/delete functions will be standard, but I want the
Insert to do
> >the following steps:
> > 1) Aborts the Insert
> > 2) Calls a SP which gets values from another table, and inserts
a new
> >record into the target dataset.
> > 3) Sets the new record into Edit-mode upon the SP returning.
> Eric,
> It simply is NOT as complicated as you describe. If you include an
> InsertSQL statement in the dataset properties, it simply *replaces*
> standard Insert processing. There is no "other insert" which has
to be
> "aborted". Just call the SP in your InsertSQL, and the standard
> processing will be overridden.

I guess I should have been more specific. I want to populate the
new record with values from another table when the user hits the '+'
button on the TIB_UpdateBar. So rather than giving the users blank
fields, the user will see the populated data. Would a Insert trigger
work better here?