Getting an exception "Keyword not supported: 'provider'."

G

Guest

Hello:

I am trying to acccess an Gracle 10g database from within an ASP.NET
application running on a Windows 2003 server.

I have tried both the following connections strings:

"Provider=msdaora;Data Source=MyOracleDB;User Id=UserName;Password=asdasd;"

and

"Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User
Id=Username;Password=asdasd;"

In both cases, I get an exception:

"Keyword not supported: 'provider'."

What am I doing wrong?

Thanks.

Venkat
 
B

Bruno Piovan

Hello Venkat,
I work with sql server, but if I use the SQLConnection and set the
"Provider" in the connection string, I get the same error, and all I need to
do is remove the provider from the connection string, since the class
sqlconnection is set to work with sql serve, so if you are using the class
OracleConnection, try to just remove the provider from the connection
string...

Bruno
 
G

Guest

Bruno:

You are god-send! Thanks so much.

Bruno Piovan said:
Hello Venkat,
I work with sql server, but if I use the SQLConnection and set the
"Provider" in the connection string, I get the same error, and all I need to
do is remove the provider from the connection string, since the class
sqlconnection is set to work with sql serve, so if you are using the class
OracleConnection, try to just remove the provider from the connection
string...

Bruno
 
Joined
Mar 28, 2009
Messages
1
Reaction score
0
switch to an oledb connection rather than an sql connection


for C# make sure to add this at top:

using System.Data.OleDb

OleDbDataReader,OleDbConnection,OleDbCommand are the object names you will use
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top