Home » Developer & Programmer » Forms » a array from a plsql package to Forms
a array from a plsql package to Forms [message #171777] Thu, 11 May 2006 07:52 Go to next message
axehigh
Messages: 9
Registered: March 2006
Junior Member
Hi guys.

I have a package function where I create a array/collection of booleans. I then try to return it to Forms, but it keep receiveing NULL.

I've tested on package level and its fine. But once I try to pass it to Forms it ends up with NULL?

Does anybody know why?
Re: a array from a plsql package to Forms [message #171835 is a reply to message #171777] Thu, 11 May 2006 12:53 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hi,

In package:

create or replace package XXX
as

TYPE tp_regel IS TABLE OF boolean
INDEX BY BINARY_INTEGER
;

...
more public declarations

end package;

in package body:

function YYY ( P_K as ......) return tp_regel
is
etc etc

In forms:

procedure VVV
v_myarray XXX.tp_regel;
begin
v_myarray := YYY(......);
exception
etc
end;

This should work.

Regards,

Rob Zijlstra


Re: a array from a plsql package to Forms [message #171857 is a reply to message #171835] Thu, 11 May 2006 16:10 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Ooops,

It should work when (in Forms) you use:

v_myarray := XXX.YYY(......);

Fully qualified with packagename.

Sorry for the slip....

Regards,

Rob Zijlstra

Re: a array from a plsql package to Forms [message #171890 is a reply to message #171777] Fri, 12 May 2006 02:29 Go to previous message
axehigh
Messages: 9
Registered: March 2006
Junior Member
Thanks Rob.

That worked.

It seems the only difference I had was that I didn't declare the array with Binary_index, and now I am using numbers instead of booleans, cause when I copied the function into Forms it worked like a charm.

But I rather have the function in a package.

Cheers.

Previous Topic: Dynamic Number count
Next Topic: modifications r not reflected to the original login form
Goto Forum:
  


Current Time: Fri Sep 20 09:38:28 CDT 2024