Subject Re: [IBO] IBO inside a dll
Author Jason Wharton
Don't use TIB_SessionProps and TIB_Session at the same time.
You use either one or the other. TIB_SessionProps is when you want access to
change values of the default session for the main thread. If you are using
explicit session control via TIB_Session then you should ignore the default
session.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Martijn Tonies" <m.tonies@...>
Newsgroups: egroups.ibobjects
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, January 08, 2002 1:41 AM
Subject: Re: [IBO] IBO inside a dll


> Hi,
>
> "Geoff Worboys" <geoff@...> schreef in bericht
> news:1541948875.20020108193914@......
> > > One more question: to be on the safe side, is it okay to create a
> > > TIB_Session for each connection? If I build this now, it would be
> > > a lot easier when I implement multi-threading later on...
> >
> > Its safe but it can get more complicated, and I guess it uses
> > additional resource (but not much as far as I can tell).
> >
> > The various IBO components are setup so that the standard
> > .Create(AOwner: TComponent) constructor will create the component
> > attached to the default TIB_Session instance (the first session
> > created when the application/thread starts).
>
> I already have a TIB_SessionProps and I set the 'usedefaultsession' to
> False.
>
> > You can assign to the IB_Session property to alter which instances of
> > TIB_Session is associated with the component.
> >
> > If you are creating components in code then you can use the special
>
> I don't have any components at forms or data modules - everything is
> created in code now.
>
> > CreateForSession( AOwner: TComponent; ASession: TIB_Session )
> > constructor which will create the component associated with the
> > required session.
> >
> > I have used the latter (CreateForSession) in multi-threaded apps. I
> > have never actually tried a direct assignment to the IB_Session
> > property of ibo components, but the feature does exist.
>
> Jups, noticed that method -- but not all components have it
> (TIBOQuery for example) - but I think when you link a TIBOxxx
> to a TIB_Connection it uses the session from that TIB_Connection
> component... right?
>
>
> --
> Martijn Tonies
> Upscene Productions
>
> InterBase Workbench - The Developer Tool for InterBase
> http://www.interbaseworkbench.com
>
> "Experience is what you get when you didn't get what you wanted"
>
>
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>