Print Thread
FAQ: How can I test a program unit with a PL/SQL Table parameter?
#10131 01/28/03 11:46 PM
Joined: Sep 1999
Posts: 21
F
faq Offline OP
Member
OP Offline
Member
F
Joined: Sep 1999
Posts: 21
I have a program unit that has a PL/SQL Table parameter. When I generate a Test Script, I cannot set or view the values of the PL/SQL Table.

Re: FAQ: How can I test a program unit with a PL/SQL Table parameter?
#10132 01/28/03 11:52 PM
Joined: Sep 1999
Posts: 22
S
Administrator
Offline
Administrator
S
Joined: Sep 1999
Posts: 22
The Test Window does not directly support collection data types as bind variables. For PL/SQL tables you need to pass a local variable of the same type as used in the program unit. For example, the dbms_output.get_lines procedure returns lines in a PL/SQL Table of strings (type dbms_output.chararr), and can be tested with the following script:[quote]
Code
declare
  lines dbms_output.chararr;
begin
  dbms_output.enable;
  dbms_output.put_line('Hello');
  dbms_output.put_line('World');
  :numlines := 2;
  dbms_output.get_lines(lines, :numlines);
  :line1 := lines(1);
  :line2 := lines(2);
end;
[/quote]


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.033s Queries: 14 (0.009s) Memory: 2.4943 MB (Peak: 3.0377 MB) Data Comp: Off Server Time: 2024-03-29 06:34:55 UTC
Valid HTML 5 and Valid CSS