Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12560: TNS:protocol adapter error

418213Jan 20 2009 — edited Jan 30 2009
Hi,
I've got this error when connecting to that Express Oracle DB(10g) with the following VB codes.

OleDbException was unhandled
ORA-12560: TNS:protocol adapter error

Private Sub Form1_Loaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Dim conn As New OleDbConnection("SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=my_pc)(PORT=1522))(CONNECT_DATA=(SERVICE_NAME=XE)));Provider=OraOLEDB.Oracle;OleDb.Net=True;User ID=web_schema;Password=wsabc;")
Dim ret_val As Integer = 0

Try
conn.Open()...

In the beginning of the program, I've put this

Imports System.Data.OleDb

The error is from the above line in italic.

I don't have any problem when connecting to the same DB using SQL*Plus!

Bst Rgds,
HuaMin

Why I put this thread here is due to that I haven't got a response from

Forum Home » Windows and .NET » ODP.NET
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2009
Added on Jan 20 2009
6 comments
1,399 views