ODP .NET - Getting TNS error
544998Nov 9 2006 — edited Nov 1 2007I am trying to develop a project in VB.Net using VS 2005. My company uses Oracle 10g for our production db.
I downloaded and installed the ODP files.
The first thing I did was try to set up a data connection for the project using the Data Source Connection Wizard. I selected Oracle, entered the server, username and password and received "ORA-12154: TNS could not resolve the connect identifier specified"
I tried a different route - coding the connection and opening it in the form load event. 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
I get the same error.
I would appreciate any help with this as I can't go forward on my project with no database connection