Create sequence [message #81485] |
Sat, 22 February 2003 13:23 |
CreativePresence
Messages: 73 Registered: December 2002
|
Member |
|
|
I have a form that i am working on & for one of the columns in a datablock i want value to be inserted by a sequence. I could modify the actual .sql file & create a "create sequnce command" but i want to create the sequence from within forms. I have tried accessing the pl/sql editor for the column, but the "create sequence command" will not compile. It states that it encountered the symbol "create". Does forms not accept the command...
create sequence s_s_proj#
increment by 1
start with 1
order
so how can i get a sequence command to impliment within forms on a datablock column?
Thanks in advance,
|
|
|
Re: Create sequence [message #81492 is a reply to message #81485] |
Sun, 23 February 2003 22:49 |
Balamurugan.R
Messages: 91 Registered: March 2001
|
Member |
|
|
Hai,
U cannot use DDL commands directly in forms.
Using FORMS_DDL('create table....') u can create
table or sequence,etc. Try it, if u find any
difficulty let me know.
With Regards,
Balamurugan.R
|
|
|
Re: Create sequence [message #81506 is a reply to message #81485] |
Tue, 25 February 2003 05:04 |
Paul
Messages: 164 Registered: April 1999
|
Senior Member |
|
|
If this is a "real world" ap, you might want to give this a bit more thought. Can you be sure the user will have rights to create an object in the database?
Since there is no OR REPLACE option with CREATE SEQUENCE, you will have to test for the existence of the sequence and DROP SEQUENCE if it exists before you can CREATE it. Is this desirable? If 2 users are running the form at the same time, will this create a problem? If you are storing this column to a table, will duplicate values caused by resetting the sequence cause problems?
Regards,
Paul
|
|
|
|