Subject Re: Newbie transaction questions
Author Marco Menardi <mmenaz@lycosmail.com>
--- In IBObjects@yahoogroups.com, Joe Martinez <joe@j...> wrote:
> Ok, but I'm not sure this applies in my situation. If you look at my
> original post, I'm NOT doing an Insert(), Set Fields, Post(). I'm
doing it
> manually, generating the SQL myself, setting the SQL parameter of
TIB_DSQL,
> and doing an Execute(), then a Commit() on the transaction. I don't
think
> POST applies in this situation, or does it?

No, it does not, I missed your original post, but what I said to you
is very important in your situation too, just your situation is
simplified :)
When you call "execute", the SQL statement is sent to the server. Use
SQLMonitor component to see what happens. That's the same I described
with "post" after and "insert".

>
> Isn't the data sent to the server when I do the Execute()? I think
you're
> just misunderstanding what I'm doing.

Basic concepts don't change.
After server gets the insert SQL statement you put into your DSQL,
triggers are fired, then the data is "inserted" and if duplicate key
are found, an exception is risen.

>
> TIB_DSQL doesn't have the BeforeInsert and AfterInsert triggers.

Triggers are SERVER "events". You can have trigger that fire
before/after basic events (insert/update/delete). Maybe you mean that
TIB_DSQL doesn't have the BeforeInsert and AfterInsert component Events.

regards
Marco Menardi

>
> -Joe