Home » Developer & Programmer » Forms » How to include a packge into built-in packages of form (merged)
How to include a packge into built-in packages of form (merged) [message #204504] Tue, 21 November 2006 01:00 Go to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

HI all.
i want to call a stored procedure in the 'when button pressed 'trigger of a button .
the stored procedure name is 'ballot'
.any one please send me the valid code urgently.plz
regards
Re: URGENT : HOW TO CALL A STORED PROCEDURE IN TRIGGER [message #204534 is a reply to message #204504] Tue, 21 November 2006 03:17 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You can call a database procedure from your code just like you would in server side pl/sql:

Begin
  -- procedure call:
  ballot(your_parameters);
End;


MHE
Re: URGENT : HOW TO CALL A STORED PROCEDURE IN TRIGGER [message #204924 is a reply to message #204534] Wed, 22 November 2006 10:59 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

my dear MAHEER it is not working,
if the right way to do this then i have no need to put my questions in ora faq.
hope u understand my big brother.
any ways thanx for your reply.but dear i have still porblem in it.
i m using oracle database 9i ,and developer form 6i,
i want to genrate random number as ,

>select * from (select empno from emp
ORDER BY dbms_random.VALUE
)where ROWNUM<11;


i put this one as a PROCEDURE at the 'when button pressed' triger,but at COMPILE it give me error at
ORDER BY DBMS_RANDOM.VALUE.
i think so the problem in form's built-in packages.
so please tell me how can i include
dbmsrand.sql or dbms_Random
in the buit-in package.
i mean how i can include a package into the given built-in package list of form 6i.
plz help me
regards
HELP :: how to include a packge into built-in packages of form. [message #204926 is a reply to message #204504] Wed, 22 November 2006 11:03 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

hi all,
i m using oracle database 9i ,and developer form 6i,
i want to genrate random number as ,

>select * from (select empno from emp
ORDER BY dbms_random.VALUE
)where ROWNUM<11;


i put this one as a PROCEDURE at the 'when button pressed' triger,but at COMPILE it give me error at
ORDER BY DBMS_RANDOM.VALUE. Embarassed
i think so the problem in form's built-in packages.
so please tell me how can i include
dbmsrand.sql or dbms_Random
in the buit-in package.

i mean how i can include a package into the given built-in package list of form 6i.
or othere possible way to perform the same action (random genration)
plz help me
regards
Re: HELP :: how to include a packge into built-in packages of form. [message #204955 is a reply to message #204926] Wed, 22 November 2006 20:50 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Quote:
if the right way to do this then i have no need to put my questions in ora faq
Talk about "biting the hand that feeds you".

If you had posted your code then we would have known that you HAD made the call correctly and that your problem was elsewhere.

If you had read the SQL reference manual you would have found that you can only 'sort' by a column that has been retrieved. Therefore, retrieve dbms_random.value in your 'select' clause and then order by it. You can also order by the column number.

David

PS ALWAYS test your SQL at the SQL*Plus prompt before adding it to your Form. It saves a lot of time in the debugging process.

[Updated on: Wed, 22 November 2006 20:51]

Report message to a moderator

Re: HELP :: how to include a packge into built-in packages of form. [message #205029 is a reply to message #204955] Thu, 23 November 2006 01:55 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

my dear ,

first all thanx for ur comment.
Laughing
i have already check it out in my sql*plus editor.my query is working fine there.
but when i put it in my form 6i developer ,it give me the error .
my simple and stright forward question is:
HOW CAN I INCLUDE A PACKGE INTO THE BUILT-IN PACKAGE LIST OF DEVELOPER(FORM 6i):

SO TELL ME THE smart way to do it.if u know it.
Re: HELP :: how to include a packge into built-in packages of form. [message #205099 is a reply to message #205029] Thu, 23 November 2006 05:27 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

ANY BODY IS THERE TO SOLVE MY PROBLEM. Mad
Re: HELP :: how to include a packge into built-in packages of form. [message #205121 is a reply to message #205099] Thu, 23 November 2006 06:37 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe that, with such an attitude towards OraFAQ Forum members, you aren't very likely to get the answer.

Nobody gets paid for spending his/her time here trying to help people to solve their problems. I'd rather spend my time on someone else's topic.
Re: URGENT : HOW TO CALL A STORED PROCEDURE IN TRIGGER [message #205170 is a reply to message #204924] Thu, 23 November 2006 13:35 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9104
Registered: November 2002
Location: California, USA
Senior Member
I believe that Oracle Developer Forms 6i had the same limitations as Oracle 8.0 that it does not allow an order by clause in a subquery. That would explain why it works from Oracle 9i SQL*Plus, but will not work from your Oracle Developer 6i form. I believe you need to upgrade your Developer Suite.
Re: URGENT : HOW TO CALL A STORED PROCEDURE IN TRIGGER [message #205191 is a reply to message #205170] Thu, 23 November 2006 18:14 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Well picked Barbara. I didn't read the OP as a sub-query. I just, incorrectly, assumed that as the 'sort by' item wasn't in the main 'select' that that was the problem. Yes, I believe it is a SQL*Plus 2 versus SQL*Plus 3 issue. The query runs on my Oracle 9 database but not on my Oracle 7 (we don't have an 8 ).

David

[Updated on: Sun, 26 November 2006 18:48]

Report message to a moderator

Re: How to include a packge into built-in packages of form (merged) [message #205299 is a reply to message #204504] Fri, 24 November 2006 03:41 Go to previous message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

TO MY DEAR
'LITTELFOOT' (WHO HAVE NO TIME FOR SUCH AN IDIOT PERSON LIKE ME. Cool

FOR YOUR KIND INFORMATION I HAVE SOLVED MY PROBLEM BY USING VIEW .
SIMPLY.
CREATE OR REPLACE VIEW BALLOT AS SELECT * FROM (SELECT DISTINCT EMPNO FROM EMP ORDER BY DBMS_RANDOM.VALUE)WHERE ROWNUM<12;

THEN I HAVE CREATED A DATA BLOCK IN DEVELOPER USING THIS VIEW(BALLOT) AND SIMPLE USE "WHEN BUTTON PRESSED'TIRGGER > GO_BLOCK('BALLOT');
EXECUTE_QUERY;


HOPE U UNDERSTAND MY WAY,AND PLEASE IF U HAVE NO TIME FOR SUCH A STUPID PROBLEMS(WHICH ARE ONLY SUBMITTED BY ME).THEN PLEASE MIND UR OWN BUSSINESS.BECAUSE I M IN NEED OF FRIENDLY SUGGESTION NOT THE ORDER OF MASTERS.
THANX TO ALL MY DEAR SENIORS (SINCERELY)SPEACIALLY TO "BARBARA",WHO HELP ME AND GIVE ME THE POSITIVE WAY TO DO SOME THING.

KEEP IN TOUCH .
Previous Topic: Sending email
Next Topic: Login screen / security for user roles (merged)
Goto Forum:
  


Current Time: Sun Feb 02 06:41:27 CST 2025