Using PIPELINED inside a Library [message #586369] |
Wed, 05 June 2013 10:38 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/c118ed8674fd7b53e109ddf1915ea26e?s=64&d=mm&r=g) |
neimad
Messages: 13 Registered: April 2013 Location: Canada
|
Junior Member |
|
|
Hi,
I would like to know if it's possible to use PIPELINED return inside a custom library with Oracle Forms Builder?
For now, i try to use it, but i get error about client side.
my code.
PACKAGE TEST IS
TYPE measure_record IS RECORD(
l4_id VARCHAR2(50),
l6_id VARCHAR2(50),
l8_id VARCHAR2(50),
year NUMBER,
period NUMBER,
VALUE NUMBER);
TYPE measure_table IS TABLE OF measure_record;
FUNCTION get_ups(foo NUMBER) RETURN measure_table PIPELINED;
END;
PACKAGE BODY test IS
FUNCTION get_ups(foo number)
RETURN measure_table
PIPELINED IS
rec measure_record;
BEGIN
SELECT 'foo', 'bar', 'baz', 2010, 5, 13
INTO rec
FROM DUAL;
-- you would usually have a cursor and a loop here
PIPE ROW (rec);
RETURN;
END get_ups;
END;
the body compile, but not the other part.
I would like after call the select * from test.get_ups(0); with a cursor into another function.
Does it possible?
Thanks.
|
|
|
Re: Using PIPELINED inside a Library [message #586372 is a reply to message #586369] |
Wed, 05 June 2013 11:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I don't know whether it is possible - I don't have your Forms version, I never tried it in mine (9.0.4).
However: I believe it was Developer Suite 6i whose PL/SQL engine didn't keep up with the database PL/SQL, while the latter Developer Suite (or - currently - Fusion Middleware) PL/SQL does the same job as the database without any problem. Therefore, I *suppose* that it should work.
Now, is that the case with the library, no idea. But, if such a package works OK within the database, create it over there and call it from your form.
(As you can see, this is pretty much useless answer ... I'm not sure of anything, I don't know whether it works, I don't know anything. Shame on me! Hopefully, someone else will know better.)
|
|
|
Re: Using PIPELINED inside a Library [message #586374 is a reply to message #586372] |
Wed, 05 June 2013 11:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/c118ed8674fd7b53e109ddf1915ea26e?s=64&d=mm&r=g) |
neimad
Messages: 13 Registered: April 2013 Location: Canada
|
Junior Member |
|
|
There's no useless answer, thanks for yours!
It works if i create package directly to the DB. but for the customers needs, i have no other choice to create the package inside a library. If it "suppose" and it should work, i will try to find why i get the error..
the error is :
Quote:This function is not supported in client-side programs
on this
FUNCTION get_ups(foo NUMBER) RETURN measure_table PIPELINED;
[Updated on: Wed, 05 June 2013 11:19] Report message to a moderator
|
|
|
|