Using Oracle Stored Proc as Data Source for PowerBuilder Data Window Object
Hi,
I'm trying to use an Oracle stored procedure as the data source for a PowerBuilder data window object. I'm using the following (which is a variation of an example given on Sybase's web site, with the appropriate database/column name changes and use of %TYPE):
======================
CREATE OR REPLACE PACKAGE pkg_dw_sp_example
AS
TYPE typ_example_rec1 IS RECORD(
v_comcodsa st_sa.comcodsa%TYPE,
v_comnamsa st_sa.comnamsa%TYPE,
v_cocitysa st_sa.cocitysa%TYPE);
TYPE cur_example_cur1 IS REF CURSOR;
RETURN typ_example_rec1;
END;
======================
CREATE OR REPLACE PROCEDURE sp_dw_example1
(arg_teamid IN st_sa.comcodsa%TYPE,
cur_team IN OUT pkg_dw_sp_example.cur_example_cur1)
AS
BEGIN
OPEN cur_team FOR
SELECT comcodsa,
comnamsa,
cocitysa
FROM st_sa
WHERE st_sa.comcodha = arg_teamid;
END sp_dw_example1;
======================
The package is created okay, but the procedure is saved with compilation errors. Unfortunately, Oracle does not indicate what the errors are (great product), so I have no idea what it is complaining about.
Questions:
1) Can anyone point me to/or provide a better example?
2) The examples in books I have seen all would have declared the procedure in the package specification - is the above valid?
3) This is a PowerBuilder specific question, but if the package does not show up in the stored procedure list when creating a data window object, how does one use it as a data source?
Oracle 8.1.7
PowerBuilder 8.0.1
Thanks,
Ed Holloman