刷新/重新连接到SQL Server [英] Refresh/Reconnect to SQL Server
问题描述
我正在使用Access 2K的内置连接方法(FILE> CONNECTION)与
Windows NT集成安全登录选项来建立我的服务器
连接。代码中有没有办法刷新或重新连接到这个
连接?
lauren quantrell< 1a是************* @ hotmail.com>写道:我正在使用Access 2K的内置连接方法(FILE> CONNECTION)
与Windows NT集成安全登录选项建立我的服务器连接。有没有办法在代码中刷新或重新连接到这个连接?
您是否看过Northwind项目样本?
>
我在启动时使用一些代码来检查是否存在有效连接。如果
没有连接,则打开连接表单。你可以使用DoCmd.RunCommand acCmdConnection来调用
连接表格。
-
问候,
布拉德利
基督徒回应
http://www.pastornet.net.au/response
谢谢,但我对提交用户使用
连接表单。这将造成各种各样的破坏!
我想要做的是,在VBA代码中,重新建立这种连接。
lq
>
2005年8月2日20:01:08 -0700,lauren quantrell
< la ********** ***@hotmail.com>写道:
应该没有必要这样做,除非你想*重新连接,
可能是为了不同的数据源。
如果你的SQL Server是静态的,你连接一次就忘了它。
-Tom。
谢谢,但是我不想向用户提供
连接表单。这会造成各种各样的破坏!
我想要做的是,在VBA代码中,重新建立这种连接。
lq
I''m using Access 2K''s built-in connection method (FILE>CONNECTION) with
the Windows NT Integrated Security login option to establish my server
connection. Is there a way in code to refresh or reconnect to this
connection?
lauren quantrell <la*************@hotmail.com> wrote:I''m using Access 2K''s built-in connection method (FILE>CONNECTION)
with the Windows NT Integrated Security login option to establish my
server connection. Is there a way in code to refresh or reconnect to
this connection?
Have you looked at the Northwind project sample?
I use some code on startup to check that there is a valid connection. If
there is no connection it opens the connection form. You can call up the
connention form using "DoCmd.RunCommand acCmdConnection".
--
regards,
Bradley
A Christian Response
http://www.pastornet.net.au/response
Thanks, but I''m not interested in presenting the user with the
connection form. That would cause all manner of havoc!
What I am trying to do is, in VBA code, re-establish this connection.
lq
On 2 Aug 2005 20:01:08 -0700, "lauren quantrell"
<la*************@hotmail.com> wrote:
There should be no need to do this, unless you want to *re*connect,
presumably to a different data source.
If your SQL Server is static, you connect once and forget about it.
-Tom.
Thanks, but I''m not interested in presenting the user with the
connection form. That would cause all manner of havoc!
What I am trying to do is, in VBA code, re-establish this connection.
lq
这篇关于刷新/重新连接到SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!