Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002

    Exclamation Connecting VB applicaiton to Oracle 8i

    Hello everyone,

    I'm moving a VB applicaiton from SQL Server to Oracle 8i.

    When connecting to SQL Server, I used OLEDB. Very effective.

    I couldn't find how to connect to Oracle 8i using OLEDB, so I relied on the good old ODBC. But I heard that not only is it possible to connect to Oracle through OLEDB, but it is faster...

    I guess I need some "How to" hints...

    Thanks !


  2. #2
    Join Date
    Jul 2002
    I found it. For all of you VB programmers who wants to connect to an Orace database, here is the connection string for your ADODC connection object :

    "Provider=OraOLEDB.Oracle;Data Source=ORCL;User ID=demo252;Password=demo252"

    Bye !


  3. #3
    Join Date
    Jul 2001
    I prefer to use MSDAORA to connect VB6 to Oracle in large networks. It requires that you provide a server name, userID and password which can be hardcoded in the startup form or retrieved from textboxes. You may want to add a commandTimeout and change the cursor location.

    sub CONXMAKE

    Set m_ORAconx = New ADODB.Connection
    Set m_ORAcmd = New ADODB.Command
    Set m_ORArs = New ADODB.Recordset

    m_strSQL = _
    "data source=" & m_Server & ";" & _
    "user id=" & m_UID & ";" & _
    "password=" & m_UPW

    With m_ORAconx
    .Provider = "MSDAORA"
    .CursorLocation = adUseClient
    .ConnectionTimeout = 3
    .ConnectionString = m_strSQL
    .Open m_strSQL, , , -1
    End With

    Set m_ORAcmd.ActiveConnection = m_ORAconx

    end sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts