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