如何以编程方式刷新链接表 [英] How to programmatically refresh linked tables

查看:60
本文介绍了如何以编程方式刷新链接表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Access 2003前端,使用SQL Server 2005后端。


我需要让前端应用程序自动刷新

链接

SQL Server表。


将来会动态添加新表,所以前端

应用程序
必须有办法跟上这个(而不是手动链接

)。


任何人都知道如何刷新通过VBA以编程方式链接?


谢谢,

泡泡

Using Access 2003 front-end, with SQL Server 2005 backend.

I need to make the front-end application automatically refresh the
linked
SQL Server tables.

New tables will be added dynamically in the future, so the front-end
application
must have a way to keep up with this (instead of manually linking
them).

Anyone knows of a way to refresh the links programmatically via VBA?

Thanks,
Bubbles

推荐答案

每个气泡:
Per bubbles:

>将来会动态添加新表格,因此前端
应用程序必须具备一种跟上这个的方法(而不是手动链接它们)。

任何人都知道通过VBA以编程方式刷新链接的方法吗?
>New tables will be added dynamically in the future, so the front-end
application
must have a way to keep up with this (instead of manually linking
them).

Anyone knows of a way to refresh the links programmatically via VBA?



当然。它是面包和黄油的东西。


你的意思是链接将从小时到/和/或用户对用户来回走动

取决于代码中发生了什么?


或者链接是否会逐渐增加?

-

PeteCresswell


Sure. It''s bread-and-butter stuff.

Do you mean links will come and go from hour-to-hour and/or user-to-user
depending on what''s going on in the code?

Or will links just be added incrementally over time?
--
PeteCresswell


4月20日上午8:21,(PeteCresswell) < x ... @ y.Invalidwrote:
On Apr 20, 8:21 am, "(PeteCresswell)" <x...@y.Invalidwrote:

每个气泡:
Per bubbles:

新表将是在未来动态添加,所以前端

应用程序

必须有办法跟上这个(而不是手动链接

他们)。
New tables will be added dynamically in the future, so the front-end
application
must have a way to keep up with this (instead of manually linking
them).


任何人都知道通过VBA以编程方式刷新链接的方法?
Anyone knows of a way to refresh the links programmatically via VBA?



当然。它是面包和黄油的东西。


你的意思是链接将从小时到/和/或用户对用户来回走动

取决于代码中发生了什么?


或者链接是否会逐渐增加?

-

PeteCresswell


Sure. It''s bread-and-butter stuff.

Do you mean links will come and go from hour-to-hour and/or user-to-user
depending on what''s going on in the code?

Or will links just be added incrementally over time?
--
PeteCresswell



链接将随着时间的推移而添加。


Links will be added over time.


4月19,下午5:40,气泡< bubbles .... @ hotmail.comwrote:
On Apr 19, 5:40 pm, bubbles <bubbles....@hotmail.comwrote:

4月20日上午8:21,(PeteCresswell) " < x ... @ y.Invalidwrote:

On Apr 20, 8:21 am, "(PeteCresswell)" <x...@y.Invalidwrote:



每个气泡:
Per bubbles:


>将来会动态添加新表格,所以前端

>应用程序

>必须有办法跟上这一点(而不是手动链接

>它们)。
>New tables will be added dynamically in the future, so the front-end
>application
>must have a way to keep up with this (instead of manually linking
>them).


>有人知道通过VBA以编程方式刷新链接的方法吗?
>Anyone knows of a way to refresh the links programmatically via VBA?


当然。这是面包和黄油的东西。
Sure. It''s bread-and-butter stuff.


您的意思是链接将从小时到/和/或用户对用户来回走动

取决于代码中发生了什么?
Do you mean links will come and go from hour-to-hour and/or user-to-user
depending on what''s going on in the code?


或者链接是否会逐渐增加?

-

PeteCresswell
Or will links just be added incrementally over time?
--
PeteCresswell



链接将随着时间的推移而添加.-隐藏引用的文字 -


- 显示引用的文字 -


Links will be added over time.- Hide quoted text -

- Show quoted text -



查找RefreshLinks的帮助。这应该让你开始刷新已经链接的表。

。保持

定义同步非常重要。我通常把它放在启动时每个应用程序打开的时间。你可以获得更复杂的功能,但是如果你没有切换链接表,那么

帮助信息应该是你所需要的。


至于以编程方式添加链接,这变得相当复杂。

它可以完成,至少对于Access后端。我的首选

方法是在新表出现时手动添加链接

并分发新的前端。我没有通过代码探索连接到SQL Server中新的

表,所以其他人将不得不建议

那个方面。

- Larry Engles

从Access 1.0第1天开始访问开发人员

Look up help for "RefreshLinks". That should get you started for
refreshing the already linked tables. It is important to keep the
definitions synchronized. I normally put this in the startup each
time the application opens. You can get much more sophisticated that
just that call, but if you are not switching the linked tables, the
help info should be all you need.

As for programmatically adding links, that gets pretty complicated.
It can be done tho, at least to an Access backend. My preferred
method has been to just add the link manually when new tables occur
and distribute the new front-end. I''ve not explored connecting to new
tables in SQL Server via code, so someone else will have to advise on
that aspect.

-- Larry Engles
Access developer since day 1 of Access 1.0


这篇关于如何以编程方式刷新链接表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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