Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using Oracle Stored Proc as Data Source for PowerBuilder Data Window Object

50025Aug 15 2002
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2002
Added on Aug 15 2002
4 comments
463 views