Re: Views

From: <gary.wong_at_cyberstore.ca>
Date: 1996/01/18
Message-ID: <4dk8h5$mhi_at_sulla.cyberstore.ca>#1/1


Adam,

> Is it possible to create a view on a table at runtime from
> within a PL/SQL block in Forms 4.5?
> I tried and got an error message about reserved words and create.
Yes it is possible, using the 'FORMS_DDL' built-in, you can create tables/views (basically run almost any DML or DDL statement).  

> What I actually want to do is display in the Form the results of
> a query resulting from a number of criteria that a user enters.
If there is to be some persistence to this 'result set', then you can do it this way. If the data exists only for this one query, then you might want to look at some other method.

> The default Oracle query mode where the user fills in various
> text items on the Form is too simple forthe query and letting
> my users bring up an editor and enter a query is beyond most
> of my users!
Were you aware that the default behavior of Forms4.5 allows users to type in more complex queries (i.e. <,>.=,<>, LIKE) ? What more did you need/want?  

> Alternatively if a view cannot be created at runtime can I put
> the results of a query into a record group and display these
> in text items on the Form?
Yes, but you can also dynamically set the 'DEFAULT_WHERE' clause for your block to be whatever you want. You can do this 'behind the scenes' so that the user doesn't get involved in the complexity. This is done via the SET_BLOCK_PROPERTY.   

> Any help gratefully received.
> Adam Knight
Hope the help is useful to you!!

Regards,
Gary Wong (gary.wong_at_cyberstore.ca)
Information Technology Consultant
(604) 360-1699 (Voice)
(604) 384-1178 (Fax) Received on Thu Jan 18 1996 - 00:00:00 CET

Original text of this message