Subject | Re: [IBO] TIB_BDataset set Session |
---|---|
Author | Jason Wharton |
Post date | 2002-08-14T18:22:15Z |
What you are likely doing is creating a component with a NIL owner and IBO
doesn't like this. You should use the TIB_Session of the thread as the owner
of the component when it is created and then you won't have to use
SetSession.
Ideally it should work as you are attempting and I will take a closer look
to see what is happening here. Consider this logged as a bug.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
doesn't like this. You should use the TIB_Session of the thread as the owner
of the component when it is created and then you won't have to use
SetSession.
Ideally it should work as you are attempting and I will take a closer look
to see what is happening here. Consider this logged as a bug.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "lseckde" <T.Stamm@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, August 12, 2002 1:43 AM
Subject: [IBO] TIB_BDataset set Session
> Hi,
>
> while using IBO in an multithreading environment, I found an problem
> (an hopefully an solution).
> As far as I know to use IBO with multiple threads each thread must
> use an separate IB_Session, but the TIB_BDataset does not override
> set SetSession function so it still uses the default session.
> After modifying the sources:
>
> TIB_BDataset = class(TIB_Dataset)
> ..
> procedure SetSession( ASession: TIB_Session ); override;
>
> and
>
> procedure TIB_BDataset.SetSession( ASession: TIB_Session );
> begin
> if IB_Session <> ASession then
> begin
> inherited SetSession( ASession );
> if assigned(FCurrentCursor) then FCurrentCursor.IB_Session :=
> ASession;
> if assigned(FBufferCursor) then FBufferCursor.IB_Session :=
> ASession;
> if assigned(FLocateCursor) then FLocateCursor.IB_Session :=
> ASession;
> if Assigned(FFilterCursor) then FFilterCursor.IB_Session :=
> ASession;
> end;
> end;
>
> it works fine.
>
> Does any body know other possible problems.
>
> Regards
> Thomas Stamm
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>