注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Memory extender

Beautiful Day..

 
 
 

日志

 
 

COMMIT_FORM; VS COMMIT;  

2010-11-03 15:17:41|  分类: EBS Form |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
follow up...
例子:客户化FORM,按某个按钮的时候去执行sql更新数据。
如果画面不会有修改,只是执行update的sql并提交。最好用FORMS_DDL('COMMIT');
因为如果用do_key('COMMIT_FORM')或COMMIT;的话,下面会有hint提示FRM-40401:No change to save
如果画面有修改,用do_key('COMMIT_FORM')可以不提示“是否保存记录”而自动默认提交保存
-------------------------------------------------------------------分割线-----------------------------------------------------------------------
------------------------------------------------------------------以下正文---------------------------------------------------------------------

COMMIT_FORM
Description

Causes Form Builder to update data in the database to match data in the form.  Form Builder first validates the form, then, for each block in the form, deletes, inserts, and updates to the database, and performs a database commit.  As a result of the database commit, the database releases all row and table locks. 
If the end user has posted data to the database during the current Runform session, a call to the COMMIT_FORM built-in commits this data to the database. 
Following a commit operation, Form Builder treats all records in all base-table blocks as if they are queried records from the database.  Form Builder does not recognize changes that occur in triggers that fire during commit processing. 

Syntax

PROCEDURE COMMIT_FORM; 
Built-in Type   restricted procedure 
Enter Query Mode  no 
If you use a PL/SQL COMMIT statement in an anonymous block or a form-level procedure, Form Builder interprets that statement as a call to the COMMIT_FORM built-in. 
COMMIT_FORM只有在它认识Form有改变时才会用Form画面的数据去更新DB中的数据,然后Commit。否则它说no change to save
------------------------------------------------------------------------------------------------------------------------------------------------------
According to sb from orafaq:
In Forms 'Commit' = 'Commit_form'.
In Forms 'Standard.commit' = SQL Commit.
The COMMIT (COMMIT_FORM) statement analyses blocks that exist in a form. If you change a table independently from the declared blocks, then the form doesn't think that it has any changes to save. It usually leads to the "FRM-40401: No changes to save" message.
But, if you use STANDARD.COMMIT, it will bypass any checking and do exactly what you have asked - commit, now!
It is also suggested to use 'standard.commit' (NOT 'commit') in procedures that reside in a form.
  评论这张
 
阅读(980)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018