<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="cn"
connectionString="Server=0.0.0.0;
Database=db;
user=sa;
Password=db123"
providerName="System.Data.SqlClient"/>
<!--Server IP Address
DatabaseName
Database User
Database User's Password-->
<add name="cn"
connectionString="ADMIN\SQLEXPRESS;
Database=db;
user=sa;
Password=db123"
providerName="System.Data.SqlClient"/>
<!--Your Computer Name
DatabaseName
Database User
Database User's Password-->
</connectionStrings>
</configuration>
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
SqlConnection cn;
cn1 = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString);
No comments:
Post a Comment