Saturday, 30 March 2013

Oracle Connection String in .NET Framework Oracle Connection String in Web.config


Oracle Connection String in Web.config


Oracle Connection String for Ms  Oracle OLEDB

<add name="ConnectionString" connectionString="Provider=MSDAORA;Data Source=localhost;Password=tiger;User ID=scott" providerName="System.Data.OleDb" />


Oracle Connection String for Instance Specific

<add name="ConnectionString2" connectionString="Data Source=
XE;Password=tiger;User ID=scott" providerName="oracle.DataAccess.Client" />

Note:Here XE is the Instance Name.

Pls check your Instance name in ,if oracle is installed at
C:\oraclexe\app\oracle\admin



Oracle Connection String for only one instance installed in machine

<add name="ConnectionString1" connectionString="Data Source=localhost;User ID=hr;password=hr"
      providerName="System.Data.OracleClient" />



Tags: Oracle connection String in web.config/app.config,Oracle connection String in asp.net,Oracle connection String in ado.net,Oracle connection String in C#,
Oracle connection String in WPF,Oracle connection String in WCF,
System.Data.OracleClient Provider,System.Data.OleDb for oracle.