SQL2005数据库连接字符串代码_SQL SERVER数据库_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

SQL数据库 2005连接字符串代码

作者:黑客防线网安SQL维护基地 来源:黑客防线网安SQL维护基地 浏览次数:0

黑客防线网安网讯:   SQL Native Client ODBC Driver   标准安全连接     Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;  您是否在使用SQL Server...

   SQL Native Client ODBC Driver
 
标准安全连接
   
Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
 
您是否在使用SQL Server 2005 Express? 请在“Server”选项使用连接表达式“主机名称SQLEXPRESS” 
  
受信的连接
   
Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
 
"Integrated Security=SSPI" 与 "Trusted_Connection=yes" 是相同的
  
连接到一个SQL Server实例
指定服务器实例的表达式和其他SQL Server的连接字符串相同。  
Driver={SQL Native Client};Server=myServerName heInstanceName;Database=myDataBase;Trusted_Connection=yes;
 
   
指定用户名和密码
oConn.Properties("Prompt") = adPromptAlways

Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;
 
   
使用MARS (multiple active result sets)
   
Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;MARS_Connection=yes;
 
"MultipleActiveResultSets=true"与MARS_Connection=yes"是相同的。
使用ADO.NET 2.0作为MARS的模块。 MARS不支持ADO.NET 1.0和ADO.NET 1.1。
  
验证网络数据
   
Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes;
 
   
使用附加本地数据库文件的方式连接到本地SQL Server Express实例
   
Driver={SQL Native Client};Server=.SQLExpress;AttachDbFilename=c:asdqwemydbfile.mdf; Database=dbname;Trusted_Connection=Yes;
 
为何要使用Database参数?如果同名的数据库已经被附加那么SQL Server将不会重新附加。 
  
使用附加本地数据文件夹中的数据库文件的方式连接到本地SQL Server Express实例
   
Driver={SQL Native Client};Server=.SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;
 
为何要使用Database参数?如果同名的数据库已经被附加那么SQL Server将不会重新附加。
  
数据库镜像
Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial Catalog=myDataBase;Integrated Security=True;
 
 
  
SQL Native Client OLE DB Provider
 
标准连接
   
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
 
您是否在使用SQL Server 2005 Express? 请在“Server”选项使用连接表达式“主机名称SQLEXPRESS”。 
  
受信的连接
   
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
  "Integrated Security=SSPI"与"Trusted_Connection=yes"相同
  
连接到SQL Server实例
指定服务器实例的表达式和其他SQL Server的连接字符串相同。  
Provider=SQLNCLI;Server=myServerName heInstanceName;Database=myDataBase;Trusted_Connection=yes;
 
   
使用帐号和密码
oConn.Properties("Prompt") = adPromptAlways

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-11289-1.html
网站维护教程更新时间:2012-03-21 03:19:34  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer