Sql Server连接字符串
2012-06-09 16:26
162 查看
写连接字符串时需要制定server(连接到哪一台电脑),database(连接到哪一个数据库)
一、使用SqlConnection对象时,需要指定连接字符串,下面是相关介绍:
uid(用户名),pwd(登陆密码),Integrated Security(连接协议true或SSPI),Initial Catalog
(连接到的数据库).下面是一些实例:
1
2
3
一、使用SqlConnection对象时,需要指定连接字符串,下面是相关介绍:
uid(用户名),pwd(登陆密码),Integrated Security(连接协议true或SSPI),Initial Catalog
(连接到的数据库).下面是一些实例:
1
string connectionString = "server = 304b2;database = students; uid = sa; pwd = "; //304b2是本机名字,还可以是用local或 . 或 127.0.0.1
2
string connectionString = "server = .;database = students;Integrated Security = SSPI";
3
string connectionString = "server = .;Initial catalog= students;Integrated Security = SSPI";
相关文章推荐
- SQL SERVER连接字符串详解
- SQL SERVER 2005 EXPRESS 连接字符串
- SQL SERVER 2005允许自定义聚合函数-表中字符串分组连接
- VB.NET连接局域网SQL Server 2000数据库字符串
- [数据库连接字符串] SQL SERVER 2008 连接字符串
- 如何获取连接sql server 2000 的字符串
- sql server连接数据库字符串
- sql server 使用for xml path 将1列多行转换为字符串连接起来
- SQL Server 2000 + 2005 + 2008 + 2008R2,完全可以共存,注意区别连接字符串写法
- SQL Server 2008连接字符串写法大全{转}
- Visual C# 2008+SQL Server 2005 数据库与网络开发--8.2.1 使用连接字符串
- VS2010连接SQL Server、Oracle数据库的字符串写法
- SQL Server 2008 连接字符串写法大全
- VB.NET连接SQL Server 2000数据库字符串
- JDBC 连接字符串 -- SQL Server 2000 和 SQL Server 2005 的区别
- SQL Server 连接字符串和身份验证 学习
- SQL Server 2008连接字符串
- SQL Server 连接字符串和身份验证
- .net & sql server连接字符串相关
- SQL Server 2000 + 2005 + 2008 + 2008R2,完全可以共存,注意区别连接字符串写法