Subject Re: [IBO] IBO, Firebird and StoredProcedure as run and forget
Author russellbelding
Thanks for your comments Ramil. Noted, each transaction must be comitted or rolled back. One way for me to proceed is to create a unit that runs in a thread with its own transaction. The thread will monitor the transaction.

Not having used threads before and reading that "things" need to be "thread-safe" I am looking for comments. (why re-invent a wheel?)

Will my new thread need its own TIB_CONNECTION and TIB_TRANSACTION?
Are these IBO objects "thread-safe"?

Are there samples anywhere?

Overall I am seeking to make put some Firebird server processing into a the backgound and give a main program an apparent boost in speed as results from stored procedures running in separate threads are not needed by other parts of the program. Only if there is a failure in the SP do I need to intervene.

Comments will be appreciated.


--- In, Ramil <khabibr@...> wrote:
> Russell,
> Any statement is executed in a transaction, that managed from client
> connection.
> Client must commit or rollback the transaction. So you cannot run SP
> without waiting for finish.
> But you can do it in the separate thread or you can execute separate
> process like isql.exe with script of executing your SP.
> Best regards,
> Ramil
> >
> > I'm using IBO 4.9.9 and FB 2.5.x. I have a stored procedure to run
> > that I can execute and I do not want to wait for a result. Usually in
> > executing a stored procedure using a TIB_DSQL the IBO code waits for
> > the SP to complete on the FB server before proceeding to the next
> > instructions. In this case I would like to say "Send any error
> > messages to a record in some table and return immediately so my code
> > can continue running." Comments will be appreciated.
> >
> > Is this possible?
> > Thanks,
> > Russell
> >
> [Non-text portions of this message have been removed]