Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Form from a stored procedure

Status
Not open for further replies.

jonerd

Programmer
Sep 4, 2003
1
US
I'm using developer 9i and trying to create a form from a stored procedure rather than a table or view, using the Oracle Forms data block wizard.

The form is able to "see" the procedure and its parameters but no columns. Since I'm a relative beginner to Forms, I'm not even sure what elements in the procedure "translate" to columns in the Form.

The code I'm using is pretty simple,

CREATE OR REPLACE PROCEDURE procedure_name
AS
my_data tablename.column_name%TYPE;
total NUMBER(10) := 0;
CURSOR summary_cursor IS
SELECT column
FROM table_name;
BEGIN
OPEN summary_cursor;

LOOP
FETCH summary_cursor INTO my_data;
EXIT WHEN summary_cursor%NOTFOUND;

IF my_data >= 128 THEN
total := total + 1;
END IF;
END LOOP;


END;
/


Any help would be greatly appreciated!
 
Your cursor is not visible from outside the procedure and your understanding of using cursor variables is completely incorrect. Read about Ref Cursor type. Note, that to use wizard it can not be weak.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top