使用连接字符串的SQL数据库连接 [英] SQL DataBase Connection using Connection String

查看:68
本文介绍了使用连接字符串的SQL数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有带有SQL Server Compact的MS Visual Studio 2008.有人可以帮助我使用web.config文件建立连接吗?

Hi ,

I have MS Visual Studio 2008 with SQL Server Compact. Can anybody help me to establish a connection using web.config file?

推荐答案

您好,

在VS2008中存在使用SqlDatasource工具使用该工具,一旦创建成功的连接,则在webconfig(ConnectionString)节中复制连接字符串

使用System.Data.SqlClient.
并使用其对象来访问对象...


仍然想知道

尝试搜索
google中的连接字符串.

谢谢
sanjeev
Hello,

there is SqlDatasource tool is present in VS2008 use that and once you create the successful connection then copy the connection string in webconfig(ConnectionString) section

use System.Data.SqlClient.
and use its object to access the conncetion...


still wondering

try to search
Connection string in google.

thanks
sanjeev


尝试一下.
Try this.
<add name="sqlConn" connectionString="DataSource=''|DataDirectory|\Database1.sdf''; Password=''mypassword''"/>


http://www.connectionstrings.com/ [ ^ ]


这篇关于使用连接字符串的SQL数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆