c# mysql and sqlserver数据库连接字符串

 

.net 项目访问sqlserver 和mysql 两种数据库时,连接字符串有些不一样

具体配置如下

<connectionStrings>
<add name="mysqlconnect" connectionString="Server={0};Port={1};Database=information_schema;Uid={2};Pwd={3};Max Pool Size=128;Connect Timeout=1;" providerName="MySql.Data.MySqlClient"></add>
<add name="sqlserverconnect" connectionString="Data Source={0},{1};Initial Catalog=master;User ID={2};Password={3};Max Pool Size=128;Connect Timeout=1;" providerName="System.Data.SqlClient"></add>
</connectionStrings>

posted @ 2016-03-24 15:50  小泥巴2008  阅读(989)  评论(0编辑  收藏  举报