Question : OracleConnection (OracleClient) works in VB.NET but not C#

Hi all, I am using the Microsoft OracleClient 1.0.3300.0 from within VS 2005

I am having a bit of trouble connecting to the oracle DB from a C# application, the strange thing is that it works in VB!
THIS WORKS CORRECTLY:
----------------------------------------------------------------------
Dim conn As New System.Data.OracleClient.OracleConnection("SERVER=(DESCRIPTION=(ADDRESS=(COMMUNITY=xxx.world)(PROTOCOL=TCP)(Host=xxx)(Port=xxx))(CONNECT_DATA=(SID=xxx)));uid=xxx; pwd=xxx; Integrated Security=no;")
        Dim dt As New DataTable
        Try
            conn.Open()
            Dim DA As New System.Data.OracleClient.OracleDataAdapter("SELECT * FROM TABLENAME", conn)
            DA.Fill(dt)
        Catch ex As Exception

        Finally
            conn.Close()
        End Try
        Me.GridView1.DataSource = dt
        Me.GridView1.Databind()
----------------------------------------------------------------------

so with that working I created an app in C# with the following code (a simple translation from vb to c#):

----------------------------------------------------------------------
OracleConnection conn = new OracleConnection("SERVER=(DESCRIPTION=(ADDRESS=(COMMUNITY=xxx.world)(PROTOCOL=TCP)(Host=xxx)(Port=xxx))(CONNECT_DATA=(SID=xxx)));uid=xxx; pwd=xxx; Integrated Security=no;");
        DataTable dt = new DataTable();
        try
        {
            conn.Open();
            OracleDataAdapter DA = new OracleDataAdapter("SELECT * FROM TABLENAME", conn);
            DA.Fill(dt);
        }
        catch (Exception ex)
        {
        }
        finally
        {
            conn.Close();
        }
        this.GridView1.DataSource = dt;
        this.GridView1.DataBind();
----------------------------------------------------------------------

the error given is
      [System.Data.OracleClient.OracleException]      {"ORA-12638: Credential retrieval failed\n"}      System.Data.OracleClient.OracleException


any ideas why it would work in VB and not in C#?

Answer : OracleConnection (OracleClient) works in VB.NET but not C#

Should be SQLNET.AUTHENTICATION_SERVICES= (NONE)
Random Solutions  
 
programming4us programming4us