四种数据库 连接字符串
SqlServer连接字符串
<add name="ConnStr" connectionString="server=127.0.0.1;database =XM_ClawDB;uid=sa;pwd=sa;"/>
MySQL 连接字符串 (注意编码和 允许时间为zero)
<add name="MySQL_Con" connectionString="server=127.0.0.1;user=root;password=sa;database=songDB;charset=gb2312;allow zero datetime=true;Convert Zero Datetime=true;"/>
SQLite 连接字符串
<add name="SQLite_ConnStr" connectionString="Data Source=E:\DataBase2008R2\SQLiteDB\MusicDownload_XM.sqlite;" providerName="System.Data.SQLite"/>
Oracle 连接字符串
<add name="Oracle_ConnStr"
connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.x.x.xxx)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl))));Persist Security Info=True;User ID=xx;Password=xx;"
providerName="Oracle.ManagedDataAccess.Client"/>
本文来自博客园,作者:兴想事成,转载请注明原文链接:https://www.cnblogs.com/mjxxsc/p/3326483.html