Thursday, February 24, 2011

Connecting Oracle in VB2010 using OLEDB

I am attempting to establish a connection with the db using the default user with the code below:

Imports System.Data.OleDb

Dim myConnection As OleDbConnection
myConnection = New OleDbConnection("Provider=OraOLEDB.Oracle;" & "Data Source=servername:portNumber;" & "UserID=odb;" & "password=odb;" & "database=tnsname")
Catch ex As Exception
MessageBox.Show("Connection Error")
End Try

Beleive it or not I continue to have the exception thrown

No comments:

Post a Comment