Can one issue DDL statements from Forms?

Q

Can one issue DDL statements from Forms?

✍: Guest

A

DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure.

A statement like CREATE TABLE X (A DATE); will result in error:
Encountered the symbol "CREATE" which is a reserved word.
However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:

FORMS_DDL('CREATE TABLE X (A DATE)');
FORMS_DDL can also be used to create dynamic SQL statements at runtime. The FORMS_SUCCESS built-in can be used to determine if the last executed built-in was successful.

2011-04-05, 5226👍, 0💬