إنتقال للمحتوى

  • تسجيل الدخول عبر الفيس بوك تسجيل الدخول عبر تويتر Log In with LinkedIn Log In with Google      تسجيل دخول    
  • إنشاء حساب

صورة
- - - - -

هل أستطيع تنفيذ جمل DDL و DML من الفورم ؟


1 رد (ردود) على هذا الموضوع

#1 naeem_dayl

naeem_dayl

    عضو

  • الأعضــاء
  • 3 مشاركة

تاريخ المشاركة 19 July 2004 - 11:13 AM

كيف أستطيع تنفيذ جمل DDL و DML
من داخل ال Form Builde
و من داخل ال Report Builder
أرجو المساعدة ياإخوه

#2 OracleMan

OracleMan

    مشترك

  • الأعضــاء
  • 152 مشاركة

تاريخ المشاركة 19 July 2004 - 12:40 PM

DML Statements you execute it without restricted inside trigger

DDL statements you can execute it by using specific Built-in which is called FORMS_DLL .here some detail about it.
Description

Issues dynamic SQL statements at runtime, including server-side PL/SQL and DDL.
Note: All DDL operations issue an implicit COMMIT and will end the current transaction without allowing Form Builder to process any pending changes.

Syntax

FUNCTION FORMS_DDL (statement VARCHAR2);
Built-in Type unrestricted function
Enter Query Mode yes

Parameters

statement Any string expression up to 32K:

n a literal

n an expression or a variable representing the text of a block of dynamically created PL/SQL code

n a DML statement or

n a DDL statement

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:

- Use semicolons where appropriate.

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

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

- Line breaks, while permitted, are not required.

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

- 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.
"I die even as a camel dies. I die in bed, in shame. May the eyes of cowards never find rest in sleep!"
Last Words of Khalid bin Al-Waleed, Sword of Allah