如何快速创建数据库连接字符串

时间:2014-06-09 14:06:07   收藏:0   阅读:476

1、新建txt文件,更改后缀名为udl

2、右击,以OLE DB Core Services 方式打开

 bubuko.com,布布扣

 

3、填写相应的服务器名、登陆方式、数据源

4、以txt方式打开文件,连接字符串已经生成了,怎么样,给力吧

[oledb]
; Everything after this line is an OLE DB initstring
Provider=SQLOLEDB.1;Password=123456;Persist Security Info=True;User ID=sa;Initial Catalog=DyanmsoftWebsite;Data Source=YYGY\SQLEXPRESS

5、写入项目配置文件

   <add key="SQLConnectionString" value="Persist Security Info=False;User ID=sa;Password=123456;Initial Catalog=DyanmsoftWebsite;Data Source=YYGY\SQLEXPRESS"></add>

 

 

如何快速创建数据库连接字符串,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!