|
-
Aug 19th, 2001, 04:32 AM
#1
Thread Starter
Fanatic Member
Allways on - COM Database Connection
I have just started using COM to connect to an Oracle 8 Database. What I want to do is create a COM component that connects to my Oracle DB independently from my Application, so if the App crashes and burns the connection is still active.
I am hoping that this would prevent timely log on's. Is this possible using ActiveX exe's? And how do I pass the connection from it to my App?
Mindcrime : )
ICQ 24003332
VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8
-
Aug 19th, 2001, 02:22 PM
#2
ActiveX exe's run in their own process context on the server.
As long as there is one reference to the server from anywhere the server is active - meaning if you code it so that the constructor makes a connection, one will always be there.
It may not be the connection your own client app made.
You can have an app on the server that sits idle, holding one the connection. As far as I know, if an app terminates, the SCM will terminate the connection to the server, which means the server will disconnect that particular thread from Oracle, depending on the type of threading used.
All the dummy app has to do is start at sever boot on the server and:
(pseudocode, obviously)
Code:
CreateObject whatever, wherever
do while 1
Sleep foraDay
Loop
-
Aug 20th, 2001, 04:44 AM
#3
Sounds like you're trying to save on the cost of Oracle seat licenses.
I had read up on ActiveX Exe's (Ax EXE) today. If my Ax Exe makes the connection, how can my App get the connection from the Ax EXE.
If you have more than one client, you are gonna have problems with this design. In VB you do
Public myConnection as ADO.Connection (or whatever)
The problem is that you are going to have contention for the connection among clients, and you have to have public data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|