Home » Developer & Programmer » Forms » Query regarding Form Designer/runtime
Query regarding Form Designer/runtime [message #81570] Mon, 03 March 2003 22:56 Go to next message
Vishnu Prajapati
Messages: 2
Registered: March 2003
Junior Member
Dear Sir/Madam,

How can I execute any DDL command in Form runtime?
for Ex. : I want to create a table in When-Button-Press trigger, is it possible? if Yes How?
Please reply me in detail,

Thanking You,

Vishnu Prajapti
Re: Query regarding Form Designer/runtime [message #81578 is a reply to message #81570] Tue, 04 March 2003 02:48 Go to previous messageGo to next message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
write this button pressed trigger.
forms_ddl('create table temp (fir number ,sec varchar2(30))');
Re: Query regarding Form Designer/runtime [message #81604 is a reply to message #81578] Wed, 05 March 2003 04:08 Go to previous message
JAFOD
Messages: 15
Registered: February 2003
Junior Member
Just keep in mind that the user will need rights to create a table (not something every shop is willing to grant because you cannot limit the right to a specific table name). Assuming you can get this right, then you must also include DDL at the 'end' of your form to drop the table. Since you can never be absolutely sure the user does not exit the form without dropping it (ie: his computer crashes in the middle of the form), you should include logic ahead of the CREATE to test for the presence of this table and DROP it if it exists. Now you run into the problem that you must either make the table name dynamic, say USER || '_TEMP', so that each USER has his/her own private temp table, or risk the possibliity of one user DROPPING the table while another user is using it.

There is uusally less problematic way of accomplishing what you wish to do with this temp table, such as CREATING a single "permanent" temp table with a column for USER name, granting users DELETE rights on this table and using either a PRE-DELETE trigger in your form combined with a Row Level BEFORE DELETE database trigger on the table, or fine grain access control, to limit their delete rights to only those rows with their USER name.

Regards,
Paul
Previous Topic: combo box... blank?
Next Topic: Running Oracle 9i Forms with the lite java version of Oracle 9iAS
Goto Forum:
  


Current Time: Fri Apr 19 11:47:40 CDT 2024