Home

FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') should not be used

Description

    The rule "FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') should not be used" states that the PL/SQL code should not use the FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') commands. These commands are used to commit or rollback changes to the database, and should not be used in PL/SQL code as they can cause unexpected results. Instead, the code should use the COMMIT and ROLLBACK commands, which are more reliable and provide better control over the database transactions.

Key Benefits

  • No Data Loss: FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') should not be used to ensure that no data is lost during the transaction.
  • Data Integrity: FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') should not be used to ensure that data integrity is maintained.
  • Transaction Consistency: FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') should not be used to ensure that transactions are consistent across the system.
  • Data Security: FORMS_DDL('COMMIT') and FORMS_DDL('ROLLBACK') should not be used to ensure that data is secure and protected from unauthorized access.

 

Non-compliant Code Example

BEGIN

IF Form_Success then
	FORMS_DDL('COMMIT');            --Non compliant code (FORMS_DDL('COMMIT') is used)
ELSIF NOT Form_Success then
	FORMS_DDL('ROLLBACK');          --Non compliant code (FORMS_DDL('ROLLBACK') is used)
END IF;

END

Compliant Code Example

BEGIN

IF Form_Success then
	COMMIT_FORM;        --Compliant code
ELSIF NOT Form_Success then
	ROLLBACK;           --Compliant code
END IF;

END
Visual Expert 2024
 VEPLSQLRULE139