现在的位置: 首页 > 综合 > 正文

PB triggerEvent与PostEvent

2011年02月04日 ⁄ 综合 ⁄ 共 724字 ⁄ 字号 评论关闭

POSTEVENT()顾名思义是 提交事件;而TRIGGEREVENT()则是 触发事件。

所以,POSTEVENT()是在其所在事件结束后执行,而TRIGGEREVENT()则是立即执行所调用的事件。

 

使用方法:objectname.TriggerEvent ( event {, word, long } )
Return value

Integer. Returns 1 if it is successful and the event script runs and -1 if the event is not a valid event for objectname, or no script exists for the event in   objectname. If any argument's value is NULL, TriggerEvent returns NULL.

返回值:1表示成功执行,-1表示执行事件失败,事件无效或者该事件没有任何脚本。如果参数是NULL,则返回NULL。

使用方法:objectname.PostEvent ( event, { word, long } )
Return value

Boolean. Returns TRUE if it is successful and FALSE if the event is not a valid event for objectname or no script exists for the event in objectname. If any argument's value is NULL, PostEvent returns NULL.
返回值:True,表示执行成功,FALSE表示事件执行失败,事件无效或者事件没有任何脚本。如果参数是NULL,则返回NULL。

奇怪了,为什么Sybase让这个两个函数的返回值不一样,郁闷。

抱歉!评论已关闭.