Jump to content
Fórum Script Brasil
  • 0

Resultado Procedure Oracle Com Cursor


Guest --Paulo --
 Share

Question

Guest --Paulo --

Boa Tarde

Tenho uma package que retorna um cursor como resultado, trazendo varias linhas.

Alem do cursor, tenho 3 variaveis texto que passo como parametros.

O problema é que quando executo a procedure pelo vb ela me da erro "Unspecified error"

Segue meu codigo da chamada do vb abaixo:

Dim cmd As New ADODB.Command

cmd.ActiveConnection = dbBase (conexao do banco)

cmd.CommandType = adCmdStoredProc

cmd.CommandText = "{PKG_MODELO4_EXCEL.RELATORIO_MODELO4_EXCEL}"

cmd.Parameters.Append cmd.CreateParameter("Prelatorio", adVarChar, adParamReturnValue, 10, Empty)

cmd.Parameters.Append cmd.CreateParameter("datade", adVarChar, adParamInput, 10, "18/10/2006")

cmd.Parameters.Append cmd.CreateParameter("dataate", adVarChar, adParamInput, 10, "18/10/2006")

cmd.Parameters.Append cmd.CreateParameter("codemp", adVarChar, adParamInput, 5, "COP11")

Dim rsteste As Recordset

Set rsteste = cmd.Execute

Segue abaixo os parametros da minha procedure:

create or replace package PKG_MODELO4_EXCEL AS

TYPE relatorio IS REF CURSOR;

PROCEDURE RELATORIO_MODELO4_EXCEL (Prelatorio OUT relatorio, datade IN VARCHAR2, dataate IN VARCHAR2, codemp IN CHAR);

end PKG_MODELO4_EXCEL;

Obrigado

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.8k
    • Total Posts
      646.6k
×
×
  • Create New...