Fixed! Oracle 11G and SqlDataSource: The ugly 'ORA-01036: illegal variable name/number' Issue

I posted my problem on Oracle's OTN Discussion Forum (http://forums.oracle.com/forums/thread.jspa?messageID=2366331&#2366331) and got two great answers.

It turns out that I was using Microsoft's Oracle provider, not Oracle's. Make sure you install Oracle's software and take care to select the right provider when creating a connection. Here's an example connection string for ASP.NET 3.5:

<connectionStrings>
<add name="ConnectionString1" connectionString="Data Source=192.168.1.104/orcl;Persist Security Info=True;User ID=system;Password=xxxpwd!!;"
providerName="Oracle.DataAccess.Client" />
</connectionStrings>

Here's a useful reply from Alex Keh on their forums:

"I would recommend using Oracle Developer Tools (ODT) for VS and ODP.NET since these products are much better integrated with .NET and Oracle.

ODP.NET uses Oracle.DataAccess.Client namespace. System.Data.OracleClient belongs to the MS provider for Oracle, which Mark pointed out. If you drag and drop DB objects using ODT, it will generate ODP.NET code for you (and give you more data source wizard options as well).

You can download the latest 11g version of ODP.NET and ODT here:
http://www.oracle.com/technology/software/tech/windows/odpnet/index.html

These support .NET 3.5 and VS 2008. "

1 Comment

Comments have been disabled for this content.