Home » Developer & Programmer » Forms » 3 problem need help quick!
3 problem need help quick! [message #307066] Mon, 17 March 2008 14:50 Go to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
Hi guys,
I have 3 problem I need to sort out quick...
1. How do I order a query? I tried with order by, but it doesn't work...
2.How do I define a type of a message? I need to get an informative pop up message, but all I get is a small message in the bottom of a window...
3.How do I change the text in an oracle informative message?

Thank you
Re: 3 problem need help quick! [message #307072 is a reply to message #307066] Mon, 17 March 2008 15:16 Go to previous messageGo to next message
sispk6
Messages: 164
Registered: November 2006
Location: pakistan
Senior Member

1. for pop up , u can use
message('xyz') ; message(' ');
NOTE:- SECOND EMPLTY MESSAGE WILL CAUSE FIRST ONE TO POP UP

2. use ALERTS if u want messages of your choice COLORS AND STYLE.

3. U CAN ORDER BY USING ORDER BY , IF CANT , WILL HAVE TO USE A LITTLE LOGIC , BY USING SUB-QUERY IN A FROM CLAUSE
Re: 3 problem need help quick! [message #307073 is a reply to message #307066] Mon, 17 March 2008 15:20 Go to previous messageGo to next message
sqlstar_student
Messages: 42
Registered: November 2007
Member
Iam a rookie but i can suggest you

1.you can set the order by in the query.or i suppose you can set it in property pallette too of the item.

2.If you need the message to be displayed like an alert instead of at bottom you just need to type it twice,it will make the message display as a alert.

ex message('Hi');
message('Hi"); thats it it will display as alert. or just create a alert and call it.

3.If you need to change the message associated with a code then i suppose you need to create an Nonpredefined exception whereRe you can give your own message instead of the defaault message;
You need to use Pragma exception_init to associate the code with the message.

ex

define p_no = 10
declare
e_emps_rem exception;
Pragma exception_init
( e_emp_rem, -2292);
begin
delete from departments
where dept no = &pno;
commit;
exception
when e_emp_rem then
dbms_output.put_line('cannot rem dept');
end;
Re: 3 problem need help quick! [message #307238 is a reply to message #307072] Tue, 18 March 2008 04:10 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
Thanx guys!

The problems with messages are solved but I still didn't figure out sorting a query... Maybe an example?
Re: 3 problem need help quick! [message #307248 is a reply to message #307238] Tue, 18 March 2008 04:28 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What do you call "sorting a query" in the Forms environment? The only answer I can think of is use of the ORDER BY clause.
Re: 3 problem need help quick! [message #307266 is a reply to message #307248] Tue, 18 March 2008 05:09 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
Yes, I would like to do an order by, but it keeps reporting an error...
Re: 3 problem need help quick! [message #307293 is a reply to message #307066] Tue, 18 March 2008 06:12 Go to previous messageGo to next message
Flash
Messages: 34
Registered: February 2008
Member
Hi,

What is the Error Message ?

You can do Order By at 2 places

1. SET_BLOCK_PROPERTY('BLOCK_NAME', ORDER_BY, 'COLUMN_NAME') in your Pre-Query

2. Use the Block Property to set the column name for the property Order_By.

Let me know if you have any issues.

Thanks
Flash
Re: 3 problem need help quick! [message #307375 is a reply to message #307293] Tue, 18 March 2008 11:55 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
Hey Flash,

Thanx for your answer. I still didn't get it, I'm really new to forms...
O.K. it's like this... I have a button that uses when button pressed trigger. In this trigger I only have execute_query; which displays all items from one table. They are ordered by the first item, but I want to order them by first and second. What should I write in the trigger? If I simply write order by and item name it doesn't work...
Re: 3 problem need help quick! [message #307399 is a reply to message #307375] Tue, 18 March 2008 16:09 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you try to modify the ORDER BY clause block property and add these columns in there?
Re: 3 problem need help quick! [message #307488 is a reply to message #307375] Wed, 19 March 2008 00:32 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Post the text that you have in the 'order by' property when it fails.

David
Re: 3 problem need help quick! [message #307580 is a reply to message #307399] Wed, 19 March 2008 03:42 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
o.k. it's like this

begin
execute_query;
order by (:nazmag,:nazpr);
end;

it displays error 103
encountered the symbol order when expecting
begin, case, declare...
Re: 3 problem need help quick! [message #307598 is a reply to message #307580] Wed, 19 March 2008 04:26 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid you got it wrong, completely wrong. We are talking about ORDER BY property, while you've put it into a trigger.

./fa/4026/0/
  • Attachment: order_by.PNG
    (Size: 1.71KB, Downloaded 179 times)
Re: 3 problem need help quick! [message #307599 is a reply to message #307598] Wed, 19 March 2008 04:28 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
o.k.
so how do I access the order by property?
Thanks
Re: 3 problem need help quick! [message #307600 is a reply to message #307599] Wed, 19 March 2008 04:29 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
sorry,
didn't see the attachment in the mail...
Re: 3 problem need help quick! [message #307633 is a reply to message #307066] Wed, 19 March 2008 05:46 Go to previous messageGo to next message
stajna
Messages: 16
Registered: February 2008
Junior Member
GOT IT;

Thanks guys!!!
Re: 3 problem need help quick! [message #307699 is a reply to message #307633] Wed, 19 March 2008 09:34 Go to previous message
sispk6
Messages: 164
Registered: November 2006
Location: pakistan
Senior Member
ohh girl ,
u reminded me of my early days in oracle ,
i learnt oracle the same way without any guidence , but ORAFAQ, and THAT WAS SOME 10 MONTHS AGO, its still early days.
keep up the hard work
soon u will be really good at it
Previous Topic: IMAGE GENERATE
Next Topic: FORMS 10G
Goto Forum:
  


Current Time: Sat Dec 10 16:55:19 CST 2016

Total time taken to generate the page: 0.07503 seconds