Connection string to connect to oracle database using asp.net [Resolved]

Posted by Amulya under ASP.NET on 8/31/2013 | Points: 10 | Views : 2430 | Status : [Member] | Replies : 1
Connection string to connect to oracle database using asp.net




Responses

Posted by: Satyapriyanayak on: 8/31/2013 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
Add reference of Oracle database client library.

Right click on “Add Reference” inside your project.
From Add Reference dialog box click on “.Net” tab
Select “System.Data.OracleClient” from Component Name
Click “OK” button to add reference.



In web.config file

<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=XE;User ID=system;Password=xyz;Persist Security Info=True;Connection Lifetime=10" providerName="System.Data.OracleClient"></add>
</connectionStrings>


call it in webpage

string strConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

Also refer

http://www.connectionstrings.com/oracle/

If this post helps you mark it as answer
Thanks

Amulya, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response