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

I posted my problem on Oracle's OTN Discussion Forum ( 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:

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

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:

These support .NET 3.5 and VS 2008. "

1 Comment

Comments have been disabled for this content.