Subject | RE: [IBO] Problem with IBO |
---|---|
Author | Riho-Rene Ellermaa |
Post date | 2001-04-05T07:30:21Z |
My application uses 6 DLL files which deal with different data proccesing
tasks.
What would be the expert recommendations - to use 6 different connections to
database or to use shared handle from EXE file.
IMO, using shared handle is faster, because you don't have to connect to
database. But are there any hidden problems?
Riho-Rene Ellermaa
senior programmer
Hansabank
tasks.
What would be the expert recommendations - to use 6 different connections to
database or to use shared handle from EXE file.
IMO, using shared handle is faster, because you don't have to connect to
database. But are there any hidden problems?
Riho-Rene Ellermaa
senior programmer
Hansabank
>
> I recommend that you do not pass an object reference from the
> EXE to the DLL
> because they are using potentially different code to process
> that object
> instance. I would only do this if I was using run-time
> packages and could be
> guaranteed that the instance would be handled by the same
> code module. This
> is also how the ShareMem unit works. It puts the memory manager in a
> run-time package (DLL) so that it is shared between EXE and DLL.
>
> What I think you should do for now is have a TIB_Connection
> in the DLL and
> instead of passing in the object reference just get the
> dbHandle out of the
> connection in the EXE and put it into the dbHandleShared
> property of the
> DLL's connection component.
>
> I am assuming that the same thread from the EXE is going to
> be in the DLL
> and that you are not spawning additional threads. If you are
> then this is a
> totally different situation needing other actions to accommodate.
>
> HTH,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> > Hi Jason :
> >
> > Recently I use IBO to develop a system. In this system I
> have a main
> > exe program that will load several sub-systems and each
> sub-system is
> > a DLL. In order to reduce the connection times to IB, so I use a
> > TIBODatabase in the main program and connect it to the
> database. When
> > the main program loads the sub-system DLL, I pass the
> TIBODatabase to
> > the DLL, and the DLL links its TIBOQueries to the TIBODatabase to
> > access data from IB.