ORA-01008 with pipelined function [message #383118] |
Tue, 27 January 2009 05:32 |
mcardia
Messages: 1 Registered: January 2009 Location: Brasil
|
Junior Member |
|
|
Hi!
I made a function called "split" inside a new package.
This function split a string like '1,2,3,4' into a table
(pipelined table of varchar2). ex:
>select * from table(funcoes_uteis.split('1,2,3,4',','))
>COLUMN_VALUE
1
2
3
4
As you see it´s works.
When I use it in a PL/SQL Script like:
DECLARE
my_var_str varchar2(1024);
BEGIN
my_var_str := '1,2,3,4';
for i in (select * from table(funcoes_uteis.split(my_var_str,',')))
loop
dbms_output.put_line(i.COLUMN_VALUE);
end loop;
END;
It´s also works.
But when I use the same code in Oracle Forms, the following error occurs
"ORA-01008: Not all variables bound"
The version of my server is 10g, and my forms 6 (yes i know it´s old, we plan to upgrade this year).
My package specification is:
PACKAGE FUNCOES_UTEIS IS
function split(wstring in varchar2, wdelimitador in varchar2 := ',') return TSPLIT pipelined;
END;
My Type TSPLIT was created with the following command:
CREATE TYPE TSPLIT AS TABLE OF VARCHAR2(32767);
Does anyone can help me?
Thanks a lot!
Mário Cardia
Brasil
[MERGED by LF]
[Updated on: Tue, 27 January 2009 15:46] by Moderator Report message to a moderator
|
|
|
Re: ORA-01008 with pipelined function [message #383120 is a reply to message #383118] |
Tue, 27 January 2009 05:40 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Forms 6 Pl/Sql engine almost certainly doesn't know the syntax.
You'd have to make your code part of a server side procedure and call it from there - or possibluy make it into a view, and select that from forms.
|
|
|
|