VS 2005 Connect to Oracle 10g NEW POST

lorena

Well-known member
Joined
Oct 23, 2003
Messages
134
Location
Phoenix, Arizona
I downloaded and installed the Oracle ODP for .NET and then added a reference to Oracle Data Access in my project references.

I tried setting a connection using a datagridview control and got an error. So I put the connection information in the form load event just to see where it fails and I get the same error when the application tries to open the connection:
"ORA-12154: TNS could not resolve the connect identifier specified"

Here is my code:
Code:
Imports Oracle.DataAccess.Client

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim conn As New OracleConnection
conn.ConnectionString = "Password=password;User ID=username;Data Source=servername;Persist Security Info=True"
conn.Open()
Console.Write("Connection Opened")
conn.Close()
conn.Dispose()
End Sub

[code=vb]

Has anyone used the Oracle ODP successfully? I really need help with this and am just not sure where to go.
 
Back
Top