1 Reply Latest reply on Sep 11, 2006 10:41 AM by 533001

    Unable to Connect - illegal attribute in connection string

      I've started using Oracle Database 10g Express Edition and ODP.net.
      with Visual Studio 2005 Professional Version.
      I want to start using odp.net with vb.net and C# and the Oracle.DataAccess.Client.

      I started sample application from ODP webpage
      When set connection using this code:

      string oradb = "Data Source=(DESCRIPTION="
      + "User Id=scott;Password=tiger;";

      OracleConnection conn = new OracleConnection(oradb);

      I get this error.
      ORA-24315: illegal attribute type
      So I simplified my string connection string to:
      string oradb = "Data Source=ORCL;User ID=scott;Password=tiger;";

      I verified access with TOAD and ORACLE Developer. (Yes, it works)
      I also reviewed my tnsnames.ora and it has ORCL as the Service name.

      I noticed that the Visual Studio Data Connection Object in the Visual Studio Environment is formated as ORCL.scott. I can rename it to ORCL. It also can
      connect to the database just fine. Doesn't seem to depend on tnsnames.ora.
      So it seems to me the oracle.data.access is failing on me and I'm not the syntax correct. So what's going on with my program. Any ideas?

      Also, Could you clarify which download I should be using. I'm afraid I might have wrong one.

      Oracle Developer Tools for Visual Studio .NET with Oracle10g Release 2 ODAC
      Oracle10g Release 2 ODAC
      Oracle Developer Tools for Visual Studio .NET (for Oracle Database10g Express Edition)
      Oracle10g ODAC
      Oracle Developer Tools for Visual Studio .NET

      Update: I reviewed my installation history and have the following:
      I installed Oracle Express home on my c:drive and Oracle 10g home on my D: drive and I am using SQL Express 2005. So now I have the following:

      Local XE version
      C:\oraclexe\app\oracle\product\10.2.0\server (server?? - don't know why?)
      Oracle.DataAccess.dll version

      Local 10g version
      Oracle.DataAccess.dll version

      Hope you have ideas to help. Thanks
        • 1. Re: Unable to Connect - illegal attribute in connection string

          I added a sample VS 2005 project which uses an Oracle XE database at http://www.kodyaz.com/files/21/visual_studio_2005_projects_on_oracle_database/default.aspx

          This VB.NET project connects to Oracle Database and executes an sql command (a select query) over the database in order to display the results on a DataGridView object.

          I hope the sample will help you.

          You can also use the Server Explorer window to create a connection to the Oracle Database.