Home » Developer & Programmer » Forms » diff. between commit_form and forms_ddl('commit')
diff. between commit_form and forms_ddl('commit') [message #87626] Sun, 23 January 2005 21:43 Go to next message
sanjiban
Messages: 10
Registered: January 2005
Junior Member
Difference between forms_ddl(‘commit’) and commit_form;. I have tried using forms_ddl(‘commit’) in most places but it does not work everywhere. for e.g., I had put it in key-next-item trigger of a field and it didn’t work, but commit_form worked.
pls help
Re: diff. between commit_form and forms_ddl('commit') [message #87632 is a reply to message #87626] Mon, 24 January 2005 08:34 Go to previous messageGo to next message
Gambit
Messages: 2
Registered: January 2005
Junior Member
These are the usage notes on Forms_ddl

Usage Notes

Commit (or roll back) all pending changes before you issue the FORMS_DDL command. All DDL operations issue an implicit COMMIT and will end the current transaction without allowing Form Builder to process any pending changes, as well as losing any locks Form Builder may have acquired.
Some supplied stored procedures issue COMMIT or ROLLBACK commands as part of their logic. Make sure all pending changes in the form are committed or rolled back before you call those built-ins. Use the SYSTEM.FORM_STATUS variable to check whether there are pending changes in the current form before you issue the FORMS_DDL command. (See Example 4.)

If you use FORMS_DDL to execute a valid PL/SQL block:

n Use semicolons where appropriate.

n Enclose the PL/SQL block in a valid BEGIN/END block structure.

n Do not end the PL/SQL block with a slash.

n Line breaks, while permitted, are not required.

If you use FORMS_DDL to execute a single DML or DDL statement:

n Omit the trailing semicolon to avoid an invalid character error.

To check whether the statement issued using FORMS_DDL executed correctly, use the FORM_SUCCESS or FORM_FAILURE Boolean functions. If the statement did not execute correctly, check the error code and error text using DBMS_ERROR_CODE and DBMS_ERROR_TEXT. Note that the values of DBMS_ERROR_CODE and DBMS_ERROR_TEXT are not automatically reset following successful execution, so their values should only be examined after an error has been detected by a call to FORM_SUCCESS or FORM_FAILURE.
Re: diff. between commit_form and forms_ddl('commit') [message #87651 is a reply to message #87626] Thu, 27 January 2005 05:08 Go to previous message
fanni
Messages: 96
Registered: March 2004
Member
AOA
when we fire COMMIT_FORMS there are 2 effects of it
-------------------------------------------------
1) it commits the all the DML transactions if any executed and pendig for commit .
2) It fires commit for all the database blocks on the form

when we fire forms_ddl('COMMIT') there is only 1 effect of it
-------------------------------------------------
1) it commits the all the DML transactions if any executed and pendig for commit .

it has no concern with database blocks
got it
regards
Farhan Ashraf
Previous Topic: use of Database procedure as data source
Next Topic: DDE and OLE
Goto Forum:
  


Current Time: Mon Sep 16 13:08:52 CDT 2024