链接字符串

2017-05-04 20:37

sqlserver:

sa身份登录:
<add name="book" connectionString="Server=.; initial catalog=DatabaseName; User ID =sa; Password =tianyun" />

windows身份登录:

<add name="ConStr" connectionString="Data Source=XEX9W2GS4YEFRLD;Initial Catalog=Phone;Integrated Security=True"/>
链接字符串使用:
string constr = ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString;

access

Provider=Microsoft.Jet.OLEDB.4.0;Data source='test.mdb'
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;
 备注:
自己的服务器可以用点来代替
initial catalog=Database;

arcigs链接服务器 

sde:oracle11g:orcl