Subject | Using the same connection inside a DLL |
---|---|
Author | fabiano_bonin |
Post date | 2004-09-27T13:37:49Z |
Hi do i make a TIBODatabase passed as a parameter from the main
application to become the default database inside a DLL?
Today i use the following approach:
DLLIBODatabase.dbHandleShared := AppIBODatabase.dbHandle;
DLLIBODatabase.IB_Session.DefaultConnection := DLLIBODatabase;
But i'd like to know if it's possible to have the same behavior
without creating an IBODatabase inside the DLL.
I tried this (inside the DLL):
AppIBODatabase.IB_Session.DefaultConnection := AppIBODatabase;
But when i try to open a query, i get an error (don't remember
exactly what error, but probably a 'missing transaction' or
something like that).
Thanks.
application to become the default database inside a DLL?
Today i use the following approach:
DLLIBODatabase.dbHandleShared := AppIBODatabase.dbHandle;
DLLIBODatabase.IB_Session.DefaultConnection := DLLIBODatabase;
But i'd like to know if it's possible to have the same behavior
without creating an IBODatabase inside the DLL.
I tried this (inside the DLL):
AppIBODatabase.IB_Session.DefaultConnection := AppIBODatabase;
But when i try to open a query, i get an error (don't remember
exactly what error, but probably a 'missing transaction' or
something like that).
Thanks.