Home » Developer & Programmer » Forms » Using PIPELINED inside a Library (Oracle Forms Builder 11gR1)
Using PIPELINED inside a Library [message #586369] Wed, 05 June 2013 10:38 Go to next message
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 messageGo to next message
Littlefoot
Messages: 21813
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 messageGo to next message
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

Re: Using PIPELINED inside a Library [message #586375 is a reply to message #586374] Wed, 05 June 2013 11:21 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess that the error message says everything you need to know ... not supported. It seems that you'll have to rewrite it.
Previous Topic: form top field
Next Topic: Oracle 10g Form builder
Goto Forum:
  


Current Time: Wed Jul 03 10:27:32 CDT 2024