Home » Developer & Programmer » Forms » Code of Creating View in Pre_Form (Oracle Form Builder 6i)
Code of Creating View in Pre_Form [message #483842] Thu, 25 November 2010 01:14 Go to next message
theowais
Messages: 75
Registered: October 2009
Location: Multan
Member
Hi Experts,

Following Code:

create or replace view dept_list as
select 1 state, 1 depth, 'DEPARTMENT' displ_value, null icn, null pk, 'A' sort_value
from dual
union
select -1 state, 2 depth, dname displ_value, null icn, null pk, 'A' sort_value
from dept
union
select -1 state, 3 depth, 'EMPLOYEES' displ_value, null icn, null pk, 'A' sort_value
from dept;

is placed in Pre_Form Trigger it generated error.
Error 103 at line 1, column 1
Encountered the symbol "create" when expected the following.

Please help me to solve the problem.

Thanks,
Re: Code of Creating View in Pre_Form [message #483853 is a reply to message #483842] Thu, 25 November 2010 01:37 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create a view in SQL*Plus and use it in a form. Do NOT create anything in a form unless there's a really good reason to do that.

If you insist, you'd use FORMS_DDL built-in - read more about it in documentation. Note that you can expect problems because trigger fires every time you run the form, so Oracle would raise "ORA-00955: name is already used by an existing object". Dropping and creating it again and again is something you should avoid.
Re: Code of Creating View in Pre_Form [message #483857 is a reply to message #483853] Thu, 25 November 2010 01:49 Go to previous messageGo to next message
theowais
Messages: 75
Registered: October 2009
Location: Multan
Member
How do I used I've created view.
Re: Code of Creating View in Pre_Form [message #483859 is a reply to message #483857] Thu, 25 November 2010 01:54 Go to previous messageGo to next message
theowais
Messages: 75
Registered: October 2009
Location: Multan
Member
Dear I've Created the view. How do I use it.
Actually this view will help me to populate data in tree format.
It's urgent.
Please...
Re: Code of Creating View in Pre_Form [message #483864 is a reply to message #483859] Thu, 25 November 2010 02:13 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I planted quite a few trees, but didn't create many forms that use trees. So, I'm afraid I can't help much.

Open Forms Online Help System and search for "tree". In there you'll find many topics, such as "Creating a Hierarchical Tree Example" and similar. Do some reading.

Also, use Forum's Search engine to see what other people have said and done.
Previous Topic: validating text item
Next Topic: Background color
Goto Forum:
  


Current Time: Thu Sep 19 00:13:19 CDT 2024