ORA-06512 during call of pack. proc with table param

da

Member
Hi !

I have error 06512 allways, when I try to execute packaged procedure with parameter of type table of varchar2.

This is a package:

create or replace package test is
type TVC2Tbl is table of varchar2(10) index by binary_integer;
procedure GetArray(ATable out TVC2Tbl);
end;
/

create or replace package body test is
procedure GetArray(ATable out TVC2Tbl) is
begin
for i in 0..9 loop
ATable(i) := to_char(i);
end loop;
end;
end;
/

This is a part of DFM file:

object OracleQuery1: TOracleQuery
SQL.Strings = (
'begin'
'testoci.GetArray(:P);'#9
'end;')
Session = OracleSession1
ReadBuffer = 25
Optimize = True
Debug = False
Variables.Data = {
0300000001000000020000003A500500000000000000010000000A0000000A00
0000}
Cursor = crDefault
Left = 152
Top = 80
end

I have Oracle8 server EE for NT v 8.0.4.3.7 and client with the same version.

What is wrong ?
 
The issue is, I get only 6512 error. More preciese error stack is:

ORA-06512
ORA-06512, line 2
 
You are running into a PL/SQL Table restriction. You cannot pass a zero-based PL/SQL Table from the server to the client, this will result in the (somewhat confusing) ORA-06512 error. Change your loop to 1..10 and it should work just fine.

------------------
Marco Kalter
Allround Automations
 
Back
Top