连接数据库字符串 connectionString

<!--SQL Server2005-->
<add name="conn" connectionString="Server=.;Database=mydb;Uid=sa;Pwd=sa" />
<add name="conn" connectionString="Data Source=.;Database=mydb;User Id=sa;Password=pack; />
<add name="conn" connectionString="Data Source=.;Initial Catalog=mydb;User ID=sa;Password=pack" providerName="System.Data.SqlClient" />
<add name="conn" connectionString="Data Source=.;Initial Catalog=mydb;Integrated Security=True" providerName="System.Data.SqlClient" />

<!--Oracle 链接字符串-->
<add name="conn" connectionString="Data Source=mis;User ID=pack;Password=pack;Persist Security Info=false;Unicode=True" providerName="System.Data.OracleClient"/>

<!--
Data Source- 或 -Server- 或 -Address- 或 -Addr- 或 -Network Address 要连接的 SQL Server 实例的名称或网络地址。

Initial Catalog- 或 -Database        数据库的名称。

Integrated Security- 或 -Trusted_Connection   
当为 false 时,将在连接中指定用户 ID 和密码。
当为 true 时,将使用当前的 Windows 帐户凭据进行身份验证。
可识别的值为 true、false、yes、no 以及与 true 等效的 sspi(强烈推荐)。

Password-或-Pwd       
SQL Server 帐户登录的密码(建议不要使用。为了维护最高级别的安全性,强烈建议改用 Integrated Security 或 Trusted_Connection 关键字)。

Persist Security Info
当该值设置为 false 或 no(强烈推荐)时,如果连接是打开的或者一直处于打开状态,那么安全敏感信息(如密码)将不会作为连接的一部分返回。
重置连接字符串将重置包括密码在内的所有连接字符串值。可识别的值为 true、false、yes 和 no。

User ID-或-Uid   
SQL Server 登录帐户(建议不要使用。为了维护最高级别的安全性,强烈建议改用 Integrated Security 或 Trusted_Connection 关键字)。

-->

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值