数据库连接字符串大全
日期:2007年8月8日 作者: 查看:[大字体 中字体 小字体]-
"Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;"
- or -
"Server=Aron1;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False"
(both connection strings prodUCes the same result)
- Trusted Connection:
"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
- or -
"Server=Aron1;Database=pubs;Trusted_Connection=True;"
(both connection strings produces the same result)
(use serverName\instanceName as Data Source to use an specifik SQLServer instance, only SQLServer2000)
- Connect via an IP address:
"Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))
- Declare the SqlConnection:
C#:
using System.Data.SqlClient;
SqlConnection oSQLConn = new SqlConnection();
oSQLConn.ConnectionString="my connection string";
oSQLConn.Open();
VB.NET:
Imports System.Data.SqlClient
Dim oSQLConn As SqlConnection = New SqlConnection()
oSQLConn.ConnectionString="my connection string"
oSQLConn.Open()
- MS Data Shape
"Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=Aron1;Initial Catalog=pubs;User ID=sa;Password=asdasd;"Want to learn data shaping? Check out 4GuyfFromRolla's great article about Data Shaping >>
上一篇:httpRuntime 一点经验
下一篇:ASP.NET应用程序安全性问题
精品推荐
热点TOP10
- ·精妙SQL语句收集
- ·SQLPLUS命令的使用大全
- ·收集的host文件网站黑名单
- ·数据库连接字符串大全
- ·SQL Server 练习题
- ·SQL中CASE的用法
- ·认识VF--Visual FoxPro 漫谈
- ·什么是SQL注入法攻击
- ·一道褒贬不一的SQL考试题
- ·学习SQL语句之SQL语句大全
- ·SQL数据库高级教程:SQL UNION 和 UNION ALL
- ·SQL Server不存在或访问被拒绝 问题的解决
- ·SQLSERVER中,数据库同步的实现
- ·MS-SQL开发常用汇总和t-sql技巧集锦
- ·MySQL管理工具SQLyog最新6.1下载
- ·“SQL Server不存在或访问被拒绝”问题的解决
- ·MySQL数据库学习手册之MySQL客户工具和API
- ·学习SQL SERVER的存储过程-之一认识存储过程语法
- ·如何删除数据库中的冗余数据(翻译)
- ·数据库物理设计经验谈
特别推荐
- ·什么是SQL注入法攻击
- ·用SQL语句删除重复记录的四种方法
- ·数据库查询优化
- ·MySQL常见错误问答!
- ·MySQL从后门进企业市场
- ·精妙SQL语句收集
- ·如何在WinNT/2K/XP下启动纯DOS
- ·自己动手做一个SQL解释器
- ·SQL SERVER实用技巧
- ·动态创建MSSQL数据库表存储过程
- ·数据库的分页问题
- ·DM分区软件使用详解
- ·对ADSL接入方式铜缆可用线对率分析
- ·收集的host文件网站黑名单
- ·修复SQL Server 2000数据库之实战经验
- ·实用的存储过程之一
- ·IIS5 ISAPI Extension Back Door
- ·MySQL中文参考手册7(MySQL存取权限系统)grant设置密码password
- ·Sql server 如何得到汉字的声母
- ·数据库物理设计经验谈
