catch all/* the records (merged 3) [message #441316] |
Sat, 30 January 2010 12:21 |
kalpataru
Messages: 72 Registered: January 2010 Location: INDIA
|
Member |
|
|
please tellme how to catch all/* the records in oracle 10g forms(D2K) by writting a oracle 10g database procedure, displaying all the records in a oracle forms block grid
i am waiting for your response.....
|
|
|
|
Re: catch all/* the records (merged 3) [message #441391 is a reply to message #441322] |
Sun, 31 January 2010 05:17 |
kalpataru
Messages: 72 Registered: January 2010 Location: INDIA
|
Member |
|
|
i don't want the block level procedure i want just calling the procedure from froms by pressing a button and in that button i want to call that oracle 10g database procedure(without using the packages)
pls tell me.............
|
|
|
|
Re: catch all/* the records (merged 3) [message #441394 is a reply to message #441392] |
Sun, 31 January 2010 05:44 |
kalpataru
Messages: 72 Registered: January 2010 Location: INDIA
|
Member |
|
|
yes i know
but how can i see the records
in a grid, how oracle forms show me all the records from that procedure.
how can i assign all records into the text_items.
WHEN-BUTTON-PRESSED trigger as
Begin
Database_procedure_name;
End;
|
|
|
Re: catch all/* the records (merged 3) [message #441397 is a reply to message #441316] |
Sun, 31 January 2010 06:37 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
The simplest way is to have the procedure return a ref cursor or pl/sql block that cintains the results of the query. Then in the form loop over the results and display the records using next_record to go to the next one each time.
This is basically what forms does when you base a block on a procedure, so why not make life simple for yourself and just do that.
|
|
|
Re: catch all/* the records (merged 3) [message #441404 is a reply to message #441397] |
Sun, 31 January 2010 11:19 |
kalpataru
Messages: 72 Registered: January 2010 Location: INDIA
|
Member |
|
|
hi friend,
thanking you for quick replay.
i have already done this but when i am trying to catch the record in the for loop in the forms declaration section it is showing error that's why i am asking you.
this is th procedure
CREATE OR REPLACE
PROCEDURE TESTPROC(c_test out sys_refcursor) AS
BEGIN
open c_test for
select * from emp;
END TESTPROC;
you just tell me what i write in oracle 10g forms to retrieve
all the records.
you give me a written document...
i am waiting for your response.
|
|
|
Re: catch all/* the records (merged 3) [message #441406 is a reply to message #441316] |
Sun, 31 January 2010 13:18 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Why not just tell us what the error you're getting is along with the code you're using?
We would probably have sorted this out already.
Something like this:
DECLARE
c_test sys_refcursor;
r_test emp%rowtype;
BEGIN
testproc(c_test);
LOOP
FETCH c_test INTO r_test;
EXIT WHEN c_test%NOTFOUND;
<code to populate your datablock here>
END LOOP;
CLOSE c_test;
END;
|
|
|