Home » Developer & Programmer » Forms » its possible to call?????????????? (oracle database 10g and forms 6i)
its possible to call?????????????? [message #408536] Tue, 16 June 2009 10:46 Go to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
hi all

its possible to call oracle database 10g procedure or function in forms 6i for example if i will make this statement as procedure or function can i call call this in forms 6i



DECLARE
l_empno EMP.empno%TYPE;
l_ename EMP.ename%TYPE;
par_rc sys_REFCURSOR;
BEGIN
OPEN par_rc FOR
SELECT *
FROM (SELECT empno, ename FROM EMP
ORDER BY dbms_random.value)
WHERE ROWNUM < 10;

FETCH par_rc INTO l_empno, l_ename;
WHILE par_rc%FOUND LOOP
FETCH par_rc INTO l_empno, l_ename;
-- your code should go here; I'm simply writing it to the screen
dbms_output.put_line(l_empno ||' - ' || l_ename);
END LOOP;
END;

thanks and looking for answer

baba

Re: its possible to call?????????????? [message #409490 is a reply to message #408536] Mon, 22 June 2009 21:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why? What are you trying to do? Base a block on a procedure? Populate a block in a loop (which is just so dumb - use the default behaviour)?

David
Re: its possible to call?????????????? [message #410134 is a reply to message #409490] Thu, 25 June 2009 07:29 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
Hi Mr. Djmartin

Actually I am developing Electronic Balloting System and I have pick data from database randomly.

Kindly Give me the suggestion what to do


Thanks
Baba


Re: its possible to call?????????????? [message #410284 is a reply to message #410134] Fri, 26 June 2009 00:13 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I assume that this is the first form that you have ever written.

Consider using a Data Block based on a Procedure.

Search this forum or google or the reference manual for 'Query Data Source Type procedure'.

David
Previous Topic: Highlihting a record in table which was displayed in a form (merged 2 ) 10g
Next Topic: Help with ImageList and Treeview in comctl32.ocx
Goto Forum:
  


Current Time: Fri Sep 20 08:46:15 CDT 2024