Subject | Re: [IBO] TIb_Session with multi-threaded tcp server |
---|---|
Author | Luiz |
Post date | 2003-02-16T21:48:24Z |
Samy,
Here is a post from Jason about this:
Here is a post from Jason about this:
>When doing multi-threading in IBO it is appropriate to use an explicitLuiz.
>TIB_Session component for each thread module. Then, when creating other IBO
>components, instead of using a nil owner, use the module's TIB_Session
>component. If it is in a datamodule then just make sure the TIB_Session
>component is first in the creation order.
>Regards,
>Jason Wharton
>CPS - Mesa AZ
>http://www.ibobjects.com
----- Original Message -----
From: <davissammybr@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, February 16, 2003 5:44 PM
Subject: [IBO] TIb_Session with multi-threaded tcp server
> Hi all,
> Im using multi-threaded TCP server using Indy with IBO. A lot of
> clients need get informations from my database. e.g. a value of
> generic field.
> I need use a Tib_Session ?
> How can i associate a Tiboquery created on execution time to a
> tib_session, and how can i associate a Tibotransaction ( created on
> execution time too)to these Tiboquery ?
>
> Im using procedures like it:
>
> Procedure Update_my_table;
> Var my_query:Tiboquery;
> my_ibotransaction:Tibotransaction;
> begin
> my_query := Tiboquery.create(self);
> my_ibotransaction := Tibotransaction.create(self);
>
> my_query.IB_Connection := My_TIBODatabase;
> my_query.IB_Transaction := my_ibotransaction;
>
> With my_query do
> Begin
> Sql.Add('my update instruction sql...');
> ExecSQL;
> end;
>
> my_query.Free;
> my_ibotransaction.Free;
>
> end;
>
> Thanks,
> Sammy Davis.