Print Thread
Sharing TOracleSession
#633 06/21/00 09:16 PM
Joined: Jun 2000
Posts: 13
B
bchau Offline OP
Member
OP Offline
Member
B
Joined: Jun 2000
Posts: 13
Hi,

I use the TOracleSession component in my Main.exe to connect to
Oracle's Database.
The issue I have is I want other executable files(3 or more) to share the same TOracleSession. I try Memory Mapping File & TMemoryStream method, Store the component in the Dll, and so far I have no luck.
Any idea or solution would be appreciated.

Thanx in advance... Bryan

Re: Sharing TOracleSession
#634 06/22/00 01:24 AM
Joined: Jun 2000
Posts: 6
Scarborough, ON, CA
1
Member
Offline
Member
1
Joined: Jun 2000
Posts: 6
Scarborough, ON, CA
Are we talking EXE loading DLLs?

If yes, here are the steps:
1. After successfully connecting to the database, you store ExternalLDA in a pointer variable.
2. In the DLL you create another OracleSession.
3. Your EXE talks to the DLL via LoadLibrary and GetProcAddress.
4. You pass your ExternalLDA pointer to the DLL.
5. In the FormCreate of the DLL, you assign the ExternalLDA from the EXE to the OracleSession's ExternalLDA in the DLL.

Et voila!

Let me know if you need some commented code.

Re: Sharing TOracleSession
#635 06/22/00 05:54 PM
Joined: Jun 2000
Posts: 13
B
bchau Offline OP
Member
OP Offline
Member
B
Joined: Jun 2000
Posts: 13
Thanks, I've done a lot of Exe calling Dll application and share the same TOracleSession. But what I need to figure out is how to share the same TOracleSession with other Exe1, Exe2, Exe(s).
The issue is I want to be able to share one TOracleSession in the main.Exe with other multiple Exe; someone suggest to use a 3 tiers method, but I am sure how to approach it. Can someone send me some example?


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.188s Queries: 13 (0.027s) Memory: 2.5037 MB (Peak: 3.0430 MB) Data Comp: Off Server Time: 2024-05-20 08:34:02 UTC
Valid HTML 5 and Valid CSS