如何让一个表每隔5分钟自动刷新另一个表的数据,在线

juanzi2003 2005-01-22 07:58:08
两个表表结构相同
...全文
249 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
lsypenghong 2005-02-24
  • 打赏
  • 举报
回复
gz
juanzi2003 2005-01-24
  • 打赏
  • 举报
回复
在pb中怎么实现呀
juanzi2003 2005-01-24
  • 打赏
  • 举报
回复
我是不知道刷新的语句该怎么写
jxf168 2005-01-24
  • 打赏
  • 举报
回复
用timer事件来写
juanzi2003 2005-01-24
  • 打赏
  • 举报
回复
是用一个服务器上的一个表去刷新另一服务器上的一个表
ribut9225 2005-01-24
  • 打赏
  • 举报
回复
如果光是刷新数据的话
那就在
timer事件里写dw_1.retrieve()
juanzi2003 2005-01-24
  • 打赏
  • 举报
回复
刷新使表里的数据更新,通过程序访问该表也可以显示出来给人看的
shinesky 2005-01-24
  • 打赏
  • 举报
回复
Datawindow timer event
Purpose
It's quite possible to add a timer to a datawindow, it's just not very well documented! This page tells you how to do it.

How to do it
Starting
Create a new Datawindow control, declare a new event within this object and call it whatever you like (I personally use ue_timer). Map this event to the pbm_timer event id. You've just created a timer event for your datawindow control.

Setting the timer interval
To make use of the timer event, the attached Datawindow object must have the Timer Interval property set. In Powerbuilder v7, this is set in the General tab of the Properties pane, the interval is set in milliseconds.

If you wish to set the value programatically, the property is "DataWindow.Timer_Interval" when using the Modify syntax, or "dw_control.Object.DataWindow.Timer_Interval" using the dot notation.

Using the event
Enter code into your event, it should now run at the specified interval. Please also see the notes below.

Notes
The timer value is set in milliseconds, unlike the Timer() function for standard Timer events.
You need to include at least one field with an expression calling Now() or Today(), in the datawindow object attached to the datawindow control, to make the timer work.
Suggestions
This is useful stuff for a framework, it may be useful to define the event in your base datawindow class. It would also be advisable to create a function to set the timer_interval, so you have a standard interface. If you're being particularly adventurous you could also use create, within a datawindow modify, to add a field with an expression mapping to the Now() function, thereby eliminating the need to remember to add this field.

ntzcm 2005-01-23
  • 打赏
  • 举报
回复
一个表每隔5分钟自动刷新另一个表的数据
你的意思我不太明白,你是说清楚点。
仅仅是表里的数据更新还是要显示出来给人看的。
你最好将你的需求写出来
Qihua_wu 2005-01-23
  • 打赏
  • 举报
回复
方法很多:
1在数据库中写一job定点执行
2写一SQL脚本,放在操作系统中定期执行(windowsnt at,unix、linux crontab)
3自己写一小程序放入内存,定时执行
。。。
myvicy 2005-01-22
  • 打赏
  • 举报
回复
一个表每隔5分钟自动刷新另一个表的数据
你的意思我不太明白,你是说清楚点。
仅仅是表里的数据更新还是要显示出来给人看的。
你最好描述一下过程。
juanzi2003 2005-01-22
  • 打赏
  • 举报
回复
没人做过吗
juanzi2003 2005-01-22
  • 打赏
  • 举报
回复
能不能说具体点,用程序实现或直接在sql sever 中实现都行
wangzhanlili 2005-01-22
  • 打赏
  • 举报
回复
用一个触发器 发现有数据写入就往 另一个表写数据
j9dai 2005-01-22
  • 打赏
  • 举报
回复
关注+友情UP
juanzi2003 2005-01-22
  • 打赏
  • 举报
回复
是用的sql sever 我也想用timer事件写,我问的是怎么去刷新
luotitan 2005-01-22
  • 打赏
  • 举报
回复
如果使用的是SQL SERVER 也可以通过定制JOB来实现,相当简单。
希望的梦想 2005-01-22
  • 打赏
  • 举报
回复
就是用timer事件来写的的
sywen 2005-01-22
  • 打赏
  • 举报
回复
可以在後臺通過trigger寫,也可以在前臺通過window的timer事件來寫,具體自己想吧。
juanzi2003 2005-01-22
  • 打赏
  • 举报
回复
数据管道还没用过呢,解决这个问题是用sql语句好还是用数据管道好?
加载更多回复(5)

752

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧