Thursday, September 18, 2014

Connection string oracle, mysql and sqlserver in asp.net

Here the quick example using connection string in mysql, oracle  and sqlserver is given below

Using ODP.NET without tnsnames.ora
    <add name="oranet" connectionString="Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =  your host name)(PORT =  your port no)) (CONNECT_DATA =  (SERVER = DEDICATED)  (SERVICE_NAME = PRODTMT) )) ;User Id=****;Password=*******"/>

Mysql

  <add name="MySqlConnectionString" connectionString="server=127.0.0.1;User Id=root;password=***;database=databaseName"
   providerName="MySql.Data.MySqlClient" />

Sql Server
    <add name="con" connectionString="Data Source=localhost;Initial Catalog=YourDataBaseName; user id=***; pwd=***   ;" providerName="System.Data.SqlClient" />

No comments:

Post a Comment

http://blogsiteslist.com