PDA

View Full Version : Oracle Database Access



sureshn
06-27-2007, 05:37 PM
I am trying to connect to oracle database (stored on a different machine) it keeps giving invalid DBProvider name. Does it support Oracle? Here is my XML Configuration file.

<db:dbProvider id="dbProvider"
provider="OraOLEDB"
connectionString="Data Source=abc.com;Database=DEVDB;UserID=abcdev;Passwo rd=abcdev;Trusted_Connection=True"/>

I tried several options but nothing works.

Any Help?

Mark Pollack
06-27-2007, 05:54 PM
Hi,

Looks like you want to use OLE to access oracle, in which case the provider name is either OleDb-1.1 or OleDb-2.0 There is also an alias for the .NET 2.0 provider, namely System.Data.OleDb.

The docs, Sec 17.2 (http://www.springframework.net/doc-1.1-M1/reference/html/dbprovider.html), show the listing of provider names and some details.There are two other oracle client options listed there as well.

Cheers,
Mark

sureshn
06-27-2007, 06:14 PM
Thanks Mark,

It works fine. I used OracleClient-2.0 and had to get rid of Database and Trusted_Connection from the stream.

Suresh.

Bruno Baia
06-27-2007, 11:31 PM
Hi,

Don't forget to install .xsd schemas into Visual Studio to enable intellisense, the provider attribute is an enumeration of all providers available.

HTH,
Bruno