Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

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=visualbasic]

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...