| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.misc -> Calling a package within VB
Hi,
I want to return a result set from a package inside a VB code, using OLE DB. The package is as follows :
Definition of the package :
  TYPE CURSOR_PARAMETRO IS REF CURSOR;
  Procedure  sp_LeerParDefTodas
        ( i_tipoparametro varchar2 ,
          o_retorno       out number,
          o_mensaje     out varchar2,
          P_CURSOR       OUT CURSOR_PARAMETRO);
...  
Definition of the package body :
        Procedure  sp_LeerParDefTodas
        ( i_tipoparametro varchar2 ,
          o_retorno       out number,
          o_mensaje     out varchar2,
           P_CURSOR       OUT CURSOR_PARAMETRO)
        as
        Begin
               o_retorno := 0;
               o_mensaje := 'Ok';
        OPEN P_CURSOR FOR               
               select   *
               from      pardef
                where     DEF_TIPPAR = i_tipoparametro
                  and     def_estado <> 'E'
                order by def_codalf ;
               if SQLCODE <> 0 then     
                o_retorno := SQLCODE;
                o_mensaje := SQLERRM;
               end if;
        End sp_LeerParDefTodas;
Here´s the connection with the database :
Con.ConnectionString = "Provider=OraOLEDB.Oracle;Password=" & Password & ";Persist Security Info=True;User ID=" & UserName & ";Data Source=" & DataSource & ";PLSQLRSet=1"
The owner of the package is 'proyecto'. When I run the VB application logged as proyecto, it works fine, but when I run with other Oracle user (with the permissions correctly defined), I receive the following error :
PLS-00306: wrong number or types of arguments in call to 'SP_LEERPARDEFTODAS' Any ideas?
Thanks in advanced,
Carlos
Received on Fri Dec 28 2001 - 13:31:50 CST
|  |  |