locked
ORA-12560: TNS:protocol adapter error

    Question

  • Hi,
    I've got this error when connecting to that Oracle DB 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=SQLOLEDB;User ID=abc_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.


    Thanks & Best Regards, HuaMin Chen. In Hong Kong, China.

    Monday, January 19, 2009 2:08 AM

All replies