Click here to Skip to main content
11,705,451 members (61,901 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Oracle VB.NET
Hi all,

Can I know what is the possible connection string and what most stable connection string to connect with oracle 10g client? because I'm in a situation where the connection and transaction either must use OleDBConnection or OdbcConnection..
Example:

Private m_MSSQLCN As OleDbConnection
Private m_MSSQLTR As OleDbTransaction
Private m_ODBCCN As OdbcConnection
Private m_ODBCTR As OdbcTransaction
Public Overridable Function OpenConnection_OleDB() As OleDbConnection
 
If (Not IsNothing(m_MSSQLCN)) Then
    If (m_MSSQLCN.State = ConnectionState.Open) Then
        m_MSSQLCN.Close()
    End If
 
    m_MSSQLCN= New OleDbConnection(MyBase.DBConnString)
    m_MSSQLCN.Open()
    Return m_MSSQLCN
End If
 
End Function
or
Public Overridable Function OpenConnection_ODBC() As OdbcConnection
 
If (Not IsNothing(m_ODBCCN)) Then
    If (m_ODBCCN.State = ConnectionState.Open) Then
        m_ODBCCN.Close()
    End If
 
    m_ODBCCN = New OdbcConnection(MyBase.DBConnString)
    m_ODBCCN.Open()
    Return m_ODBCCN
End If
 
End Function
ReadOnly Property DBConnString() As String
 
Get
   Return "DSN=" & clsGlobVars.strDataSource & ";UID=" & clsGlobVars.strUserID &
          ";PWD=" & clsGlobVars.strPassword & ";"
End Get
 
End Property

Currently I'm using DSN,UID,PWD for ConnStr. If anyone know others,please help me..
Asking help from expertise for this..tq
Posted 4-Oct-12 18:22pm
Edited 4-Oct-12 18:23pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I would suggest to go with this link for possible connection string formats.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 500
1 OriginalGriff 269
2 CPallini 82
3 ppolymorphe 68
4 Inimicos 60
0 OriginalGriff 9,053
1 Sergey Alexandrovich Kryukov 8,347
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100