how to reconnect to Oracle from VB 4 app

From: Geoff Ingram <lsgvi02_at_chsrh1.agw.bt.co.uk>
Date: 1996/12/19
Message-ID: <32B94A8F.371E_at_chsrh1.agw.bt.co.uk>#1/1


[Quoted] Running VB 4 on Windows NT 3.5.

I want to connect to a particular Oracle account within my VB app, and later close this connection, then reconnect to a different Oracle account.

I can connect to Oracle using:

MyWorkspace.OpenDatabase("", False, False, "ODBC;")

this works fine. To reconnect, I call OpenDatabase again and specify a different account/password in the dialog.

The connection to the new user *does* take place (shown by auditing connections) but immediately disconnects, leaving the app still connected to the first session.

What do I need to do to close the first connection, and keep the second.

I tried:

set DBEngine = Nothing before the OpenDatabase. I tried Workspace.Close before the OpenDatabase. Neither made a difference. (The docs say that Close on the default Workspace(0) that I am using is ignored).

regards
Geoff Ingram Received on Thu Dec 19 1996 - 00:00:00 CET

Original text of this message