Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle database MDAC 2.8

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
I have MDAC 2.8 installed on one machine and I cannot connect to my ORacle database. On I have 2.6 on another machine which works fine.

works on 2.6 not on 2.8

Option Explicit

Public m_adoCnn As New ADODB.Connection
Public m_adoRst As New ADODB.Recordset

Public Sub Command1_Click()
m_adoCnn.ConnectionString = "Provider=MSDAORA;Password=mypassword;User ID=MyUser;Data Source=MyDatabase"
m_adoCnn.Open
End Sub

Private Sub Form_Unload(Cancel As Integer)
m_adoCnn.Close
End Sub


works on both


Option Explicit

Dim m_oraSession As Object
Dim m_oraDatabase As Object

Private Sub Command1_Click()
Set m_oraSession = CreateObject("OracleInProcServer.XOraSession")
Set m_oraDatabase = m_oraSession.DBOpenDatabase("MYDatabase", "MyUser/Mypassword", 0&)

MsgBox "Connected to " & m_oraDatabase.Connect & "@" & m_oraDatabase.DatabaseName
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set m_oraDatabase = Nothing
Set m_oraSession = Nothing
End Sub


Are there any issues with MDAC 2.8 and Oracle 9i or am i barking up the wrong tree.

Regards,


 
Sorry getting confused here. Neither of the sample code work on the machine with 2.8.
 
Thanks for the reply. I eventually got it working by setting the ORACLE_HOME environment variable. Thought everything OK. Then ran an oracle application and that wouldn't work. Uninstalled and re-installed oracle and everything is now working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top