lorena Posted November 9, 2006 Posted November 9, 2006 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. Quote
FZelle Posted November 10, 2006 Posted November 10, 2006 http://www.c-sharpcorner.com/Code/2004/Feb/ODP.NET02.asp Here you have everything needed for ODP. You are sure your Servername is correct? Quote
lorena Posted November 13, 2006 Author Posted November 13, 2006 Thanks for the information. Yes, I am sure the servername is correct. It looks like my connection string is the same. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.