DOA COM & D7

I've "inherited" an application that I need to convert to remove the BDE. We have already chosen DOA as the tool of choice.

This particular program consists of an EXE with a DB Connection (which was easy to convert) but it has multiple threads each of which connects to a DLL using a COM interface and has its own database connection. As you can imagine the lead-time for creating threads is not the greatest...

If it was a normal DLL I'd use the instructions in the manual & either pass the TOracleSession or pointer to the LDA/SVC.

Can I do this to a COM DLL & if so how?

Ideally a bit of example code would be good :)

Thanks,

Mike
 
If multiple threads access the same session, then TOracleSession.ThreadSafe must be set to True. As a result, all threaded database access is serialized (a session can only do one thing at a time!).

If you want to maximize parallelism, you should therefore use multiple sessions.

If you want to minimize the number of sessions, you should use a ThreadSafe session. An example of passing a session from a host application to a DLL can be found here .
 
Back
Top