您的位置:首页 > 数据库

如何使用vs2005自带的sql2005 express

2009-11-14 02:54 471 查看
如何使用vs2005自带的sql2005 express

数据库内容 2009-06-04 14:31 阅读305 评论1
字号:

1.安装VS2005时选择SQL2005一并安装,安装完成后开始菜单只有配置管理器;
2.到microsoft官方免费下载SQL2005管理工具Microsoft SQL Server Management
Studio Express Service Pack 2,
下载地址:
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796
3.安装Microsoft SQL Server Management Studio Express Service Pack 2;
4.打开Microsoft SQL Server Management Studio Express,用window认证登陆sqlserver;
5.新建查询,输入:
exec sp_password null,'你的密码',sa
alter login sa enable
执行命令
6.在你的服务器(根节点)上右键-属性,选择安全性,把服务器身份验证改为SQL
Server 和 Windows 身份验证模式;
7.重启服务,完成。
8.使用字符串连接sql2005:
SqlConnection con = new SqlConnection(@"Data Source=localhost/SQLEXPRESS;Initial Catalog=testDB;Persist Security Info=True;User ID=sa;Password=123456");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: