Packages and VARRAYS

jabarreras

Member²
Hello:

We use Delphi7 upd1 and DOA 4.0.5.0 with ORACLE 9.2.0.8.0

PL-> (inside the package testDOA)

Code:
TYPE aPar is VARRAY(5) OF VARCHAR2(30);
function TstParam(nPar out integer, vPar OUT aPar) RETURN VARCHAR2
BEGIN
  vPar:=aPar();
  -- and we fill nPar and vPar
END;
In Delphi I can't see the way I can reach vPar.

I've been searching posts about this topic, I've read about TOracleObject.
You can use DeclareVariable and SetComplexVariable to deal with this kind of parameters in a TOracleQuery, but such methods are not available for TOraclePackage.
We don't want to use Package Wizard.

Help needed!!!!
 
You cannot use a TOraclePackage for this, so you will have to use a TOracleQuery with a PL/SQL Block with a call and the necessary variables, or the Package Wizard. Note that the VARRAY must be defined as a standalone type (create or replace type), and not within a package.
 
Originally posted by Marco Kalter:
... Note that the VARRAY must be defined as a standalone type (create or replace type), and not within a package.
That remark, has to be in that way with Pck wizard?
I'm having the error "TestDoa.Apar not found".

By the way, it would be very interesting for newbies to have different code examples because in 'demos' directory there is not much to read about and there's a lot of posts with this sort of question.

Thanks for your time and have a nice weekend. ;)
 
Back
Top