Solved

VB6 and Oracle 9.2/10g

Posted on 2011-03-08
2
1,220 Views
Last Modified: 2012-05-11
We have a VB6 application that access Oracle database
using 9.2 client.   When we try to run this application using a
10g client, we experience problems with database
connections getting dropped, application hangs, etc.

We'd prefer to use the 10g client, but we are not sure what
needs to be changed in order to get it to work.

Example below of logic we are using to create db connections
in app...
Set mvarSession = CreateObject("OracleInProcServer.xOraSession")

Set mvarConnection = Nothing
    Set mvarConnection = New RDO.rdoConnection
    sAltersession = "ALTER SESSION SET OPTIMIZER_MODE=RULE"
    With mvarConnection
        .Connect = "uid=" & sUserID _
                & ";pwd=" & sPassword _
                & ";DSN=" & sRemoteDatabase & ";"
        .CursorDriver = rdUseClientBatch
        .EstablishConnection rdDriverNoPrompt
        .Execute sAltersession
    End With

Open in new window

0
Comment
Question by:DoubleV47
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 16

Accepted Solution

by:
HooKooDooKu earned 500 total points
ID: 35071616
Do you have the correct version of the Oracle InProc Server installed?

We've used the "Oracle InProc Server 2.3 Type Library" referenced by our VB project and use the OraSession and OraDatabase objects.

Dim WS as OraSession
Dim DB as OraDatabase
Set WS = CreateObject("OracleInProcServer.XOraSession")
Set DB = WS.OpenDatabase( DatabaseName, UserID & "/" & Password, ORADB_DEFAULT)
DB.ExecuteSQL("ALETER SESSION SET NLS_DATE_FORMAT = 'MM/DD/RRRR HH:MI:SS AM'")
0
 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 35071656
BTW, to then open a record set...

We use the CreateDynaset() in OraDatabase.

For example, to get a read-only record set
Dim RS as OraDynaset
  set RS = DB.CreateDynaset(SQL$, ORADYN_READONLY)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question