惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
F
Fortinet All Blogs
Y
Y Combinator Blog
C
Check Point Blog
Latest news
Latest news
A
About on SuperTechFans
Spread Privacy
Spread Privacy
W
WeLiveSecurity
Know Your Adversary
Know Your Adversary
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
T
Troy Hunt's Blog
T
Threatpost
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 司徒正美
Cloudbric
Cloudbric
J
Java Code Geeks
N
News | PayPal Newsroom
雷峰网
雷峰网
N
News and Events Feed by Topic
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
Recorded Future
Recorded Future
爱范儿
爱范儿
C
Cisco Blogs
P
Proofpoint News Feed
Hacker News: Ask HN
Hacker News: Ask HN
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
O
OpenAI News
大猫的无限游戏
大猫的无限游戏
Webroot Blog
Webroot Blog
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
S
Secure Thoughts
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
V
Vulnerabilities – Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
D
Darknet – Hacking Tools, Hacker News & Cyber Security
SecWiki News
SecWiki News
Martin Fowler
Martin Fowler
阮一峰的网络日志
阮一峰的网络日志
P
Privacy & Cybersecurity Law Blog

博客园 - 网际浪人

.Net Framework 4.0 中利用Task实现并行处理、串并行混合处理 C# Process调用应用程序失败时应注意的问题 程序员的幽默 To腾讯:强行收集用户个人隐私的行为不可饶恕 VS2005打开VS2008项目的2种方法(转) 【转】Oracle Conversion Functions 晨星、银河基金业绩排行榜数据转换工具 ORACLE纯SQL实现多行合并一行 ASP.NET项目添加Log4Net后,发布后无法写日志 “必应”不应、“谷歌”不歌 你好2009,再见2008,牛年犇犇犇 一种在SQLServer中实现Sequence的高效方法 oledb使用Access更新和插入操作的注意点 5.12大地震——小学二年级小表妹谢可欣的诗 GridView自动排序 对HtmlEncode的增强——HtmlEntitiesEncode GridView中使用DataKeyNames存储数据键值 C#调用Excel VBA宏 封装SoapException处理Webservice异常
[转]SQL Server 2005链接字符串
网际浪人 · 2008-05-16 · via 博客园 - 网际浪人

SQL Native Client ODBC Driver

Standard Security

  1. Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword

Trusted Connection

  1. Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes

Connecting to a SQL Server Instance

  1. Driver={SQL Native Client};Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes

Prompt UserName and Password

  1. oConn.Properties("Prompt") = adPromptAlways  
  2.   
  3. Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase

Enabling MARS(multiple active results sets)

  1. Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;MARS_Connection=yes

Encrypt data sent over network

  1. Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes

Attach a database file on connect to a local SQL Server Express Instance

  1. Driver={SQL Native Client};Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf; Database=dbname;Trusted_Connection=Yes

Attach a database file, located in the data directory, on connect to a local SQL Server Express Instance

  1. Driver={SQL Native Client};Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes

Database Mirroring

  1. Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial Catalog=myDataBase;Integrated Security=True;  

SQL Native Client OLE DB Provider

Standard Security

  1. Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword

Trusted Connection

  1. Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes

Connecting to a SQL Server Instance

  1. Provider=SQLNCLI;Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes

Prompt for username and password

  1. oConn.Properties("Prompt") = adPromptAlways  
  2.   
  3. oConn.Open "Provider=SQLNCLI;Server=myServerAddress;DataBase=myDataBase

Enabling MARS(multiple active results sets)

  1. Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;MarsConn=yes

Encrypt data sent over network

  1. Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes

Attach a database file on connect to a local SQL Server Express Instance

  1. Provider=SQLNCLI;Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf; Database=dbname;Trusted_Connection=Yes

Attach a database file,located in the data directory,on connect to a local SQL Server Express Instance

  1. Provider=SQLNCLI;Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes

Database Mirroring

  1. Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial Catalog=myDataBase;Integrated Security=True;  

SqlConnection (.NET)

Standard Security

  1. Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword

Standard Security alternative syntax

  1. Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False

Trusted Connection

  1. Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI

Trusted Connection alternative syntax

  1. Server=myServerAddress;Database=myDataBase;Trusted_Connection=True

Connect to a SQL Server Instance

  1. Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True

Trusted connection from a CE device

  1. Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword

Connect via IP address

  1. Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword

Enabling MARS(multiple active results sets)

  1. Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;MultipleActiveResultSets=true

Attach a database file on connect to a local SQL Server Express Instance

  1. Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes

Attach a database file,located in the data directory,on connect to a local SQL Server Express Instance

  1. Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes

Using an user instance on a local SQL Server Express instance

  1. Data Source=.\SQLExpress;Integrated Security=true;AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true

Database Mirroring

  1. Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial Catalog=myDataBase;Integrated Security=True

Asynchronous processing

  1. Server=myServerAddress;Database=myDataBase;Integrated Security=True;Asynchronous Processing=True;  

SQL Server 2005 specials [ context connection ]

C#代码

  1. using(SqlConnection connection = new SqlConnection("context connection=true"))  
  2.  {  
  3.      connection.Open();  
  4.        
  5.  } 

Visual Basic代码

  1. Using connection as new SqlConnection("context connection=true")  
  2.      connection.Open()  
  3.        
  4.  End Using