This discussion is archived
1 Reply Latest reply: Sep 11, 2006 3:41 AM by 533001 RSS

Unable to Connect - illegal attribute in connection string

525217 Newbie
Currently Being Moderated
I've started using Oracle Database 10g Express Edition and
with Visual Studio 2005 Professional Version.
I want to start using with 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 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
    533001 Newbie
    Currently Being Moderated

    I added a sample VS 2005 project which uses an Oracle XE database at

    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.