sql连接字符串 [英] sql connection string
本文介绍了sql连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
再次问好,
有人能告诉我正确的连接字符串吗?我的数据库是在远程服务器的E:驱动器上的
。我可以将驱动器从我当地的
机器映射到它,或者使用\\servername \ stuff。
我不能似乎做对了。
谢谢,
艺术
解决方案
我想你正在使用MS Access?
有一种简单的方法可以创建一个连接字符串:
- 创建一个新的文本文件
- 将它从''New Text Document.txt''重命名为''Connection.udl''(名称
不重要,扩展名是重要的部分)
- 双击此文件
- 在第一个选项卡(提供商)上选择''Microsoft Jet 4.0 OLE DB Provider''
- 点击''下一个''按钮
- 浏览到数据库并选择它
- 按''测试连接''按钮,这应该成功
- 关闭向导
- 用记事本打开UDL文件
- 最后一行是连接onstring to use
祝你好运!
-
亲切的问候,
Ken Huysmans
http://www.khsw-be.net
www.connectionstrings.com < ---很好的网站:)
-
- Sahil Malik [MVP]
ADO.NET 2.0一书 -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
------------- -------------------------------------------------- ----------------------------
" Art" < Ar*@discussions.microsoft.com>在消息中写道
news:82 ********************************** @ microsof t.com ...再次问好,
任何人都可以告诉我使用正确的连接字符串吗?我的数据库是远程服务器的E:驱动器上的
。我可以将驱动器从我当地的机器映射到它,或者使用\\servername \的东西。
我似乎无法正确使用它。 />
谢谢,
艺术
肯,
我可以这样做用SQL Server?我现在不上班,直到明天才能测试它。如果这适用于sql server它听起来很棒!
艺术
" kHSw"写道:
我想你正在使用MS Access?
有一个简单的方法来创建一个连接字符串:
- 创建一个新的textfile
- 将它从''New Text Document.txt''重命名为''Connection.udl''(名称
不重要,扩展名是重要部分)
- 双击此文件
- 在第一个选项卡(提供程序)上选择''Microsoft Jet 4.0 OLE DB提供程序''
- 单击下一步按钮
- 浏览到数据库并选择它
- 按测试连接按钮,这应该成功
- 关闭向导
- 用记事本打开UDL文件
- 最后一行是连接字符串好运!
好运!
-
亲切的问候,
Ken Huysmans
http://www.khsw-be.net
Hello again,
Can anyone tell me the correct connection string to use? My database is on
the E: drive of a remote server. I can either map a drive from my local
machine to it, or use the \\servername\ stuff.
I can''t seem to get it right.
thanks,
Art
解决方案
I suppose you are using MS Access?
There''s an easy way to create a connectionstring:
- Create a new textfile
- Rename it from ''New Text Document.txt'' to ''Connection.udl'' (the name
doesn'' matter, the extension is the important part)
- Doubleclick on this file
- On the first tab (Provider) select ''Microsoft Jet 4.0 OLE DB Provider''
- Click the ''Next'' button
- Browse to the database and select it
- Press the ''Test Connection'' button, this should succeed
- Close the wizard
- Open the UDL file with notepad
- The last line is the connectionstring to use
Good luck!
--
Kind regards,
Ken Huysmans
http://www.khsw-be.net
www.connectionstrings.com <--- good site for this :)
--
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
-------------------------------------------------------------------------------------------
"Art" <Ar*@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com...Hello again,
Can anyone tell me the correct connection string to use? My database is
on
the E: drive of a remote server. I can either map a drive from my local
machine to it, or use the \\servername\ stuff.
I can''t seem to get it right.
thanks,
Art
Ken,
Can I do this with sql server? I''m not at work right now and can''t test it
out till tomorrow. If this works with sql server it sounds great!
Art
"kHSw" wrote:
I suppose you are using MS Access?
There''s an easy way to create a connectionstring:
- Create a new textfile
- Rename it from ''New Text Document.txt'' to ''Connection.udl'' (the name
doesn'' matter, the extension is the important part)
- Doubleclick on this file
- On the first tab (Provider) select ''Microsoft Jet 4.0 OLE DB Provider''
- Click the ''Next'' button
- Browse to the database and select it
- Press the ''Test Connection'' button, this should succeed
- Close the wizard
- Open the UDL file with notepad
- The last line is the connectionstring to use
Good luck!
--
Kind regards,
Ken Huysmans
http://www.khsw-be.net
这篇关于sql连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文