rspec/rules/S4576/plsql/rule.adoc

51 lines
1.1 KiB
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
``++FORMS_DDL++`` command, like every DDL statements, is performing an implicit COMMIT. It should be used only if there is no pending transaction otherwise this transaction is automatically committed without updating the Form statuses. Also, the potentially acquired locks are lost in case of this implicit COMMIT.
"FORMS_DDL('COMMIT')" and "FORMS_DDL('ROLLBACK')" should be used with care and most of the time, "COMMIT_FORM" or "ROLLBACK_FORM" should be preferred.
Check the Oracle Forms documentation for more details.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,sql]
2021-04-28 16:49:39 +02:00
----
FORMS_DDL('COMMIT');
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,sql]
2021-04-28 16:49:39 +02:00
----
COMMIT_FORM;
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace "FORMS_DDL('COMMIT')" by "COMMIT_FORM"
or
Replace "FORMS_DDL('ROLLBACK')" by "ROLLBACK_FORM"
'''
== Comments And Links
(visible only on this page)
=== on 12 Apr 2018, 21:09:40 Ann Campbell wrote:
If possible [~alexandre.gigleux] I would shorten the title to: "FORMS_DDL" should not be used
endif::env-github,rspecator-view[]