DOA DLL and non-DOA host program LoginDataArea

rmuss

Member
My host program is connecting to ORACLE using BDE. After connecting I am calling my DOA DLL and I want to use the same Database Session. The DOA documentation makes reference to a Login Data Area and that I need to pass the pointer to the LDA to my DLL. What the heck is the LDA and how do I determine the pointer?
 
The ExternalLDA is a pointer to a so called Logon Data Area. This represents a database session in OCI7 mode (SQL*Net 2.x). If you want to use it and are using Net8, then you must set TOracleSession.Preferences.UseOCI7 to True.

To share a BDE session of a host application with a TOracleSession in a DLL, you must first get hold of the LDA of the BDE session. I'm not sure where this can be found, but maybe someone else does?

Furthermore you must make sure that the BDE and Direct Oracle Access are using the same SQL*Net or Net8 DLL. You can force Direct Oracle Access to use a specific DLL by setting the global OCIDLL variable, located in the OracleCI unit. If, for example, the BDE uses ora73.dll (SQL*Net 2.3), then you need to set OCIDLL to 'ora73.dll'.

When you have all of this working, then you need to be very much aware of the complications of a shared session. The most common cause for problems is transaction management, but there may be other issues as well depending on the characteristics of your host application and the DLL.

------------------
Marco Kalter
Allround Automations
 
Back
Top