四种数据库 连接字符串

 

 

  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"/>

 

posted @ 2013-09-17 16:11  兴想事成  阅读(252)  评论(0编辑  收藏  举报