Execution of procedure with parameters in Delphi

Este forum é destinado a perguntas relacionadas a Oracle, mas que não se enquadram nos forums acima. Aqui serão tratadas também sobre outras tecnologias da oracle, como o Workflow, BPEL, Spatial, OCS, etc.
Post Reply
HenriqueMachado
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 48
Joined: Mon, 29 May 2006 1:24 pm
Location: Blumenau - SC

Hello,

I have a question relating Delphi and Oracle in the execution of procedure.

Next: I have a bank procedures that are currently called by another "master procedure" (let's call it).

However, I have to start all of Delphi, Application.

But the parameters that are passed, are types of the bank, and I do not know how to pass this parameter in Delphi.

Does anyone have an idea?


I will give an example:

Below are my types (somewhat summarized)

Select all

 
CREATE OR REPLACE 
TYPE                                                       TCALCIPTU AS OBJECT 
( 
  ID_IMOVEL NUMBER, 
  ID_LOTE NUMBER, 
  EXERCICIO NUMBER, 
  AREA_LOTE NUMBER, 
  FATOR_PROFUNDIDADE CHAR(1), 
  VALOR_FATOR_PROFUNDIDADE NUMBER, 
  FATOR_DEPRECIACAO CHAR(1), 
  AREA_TRIBUTAVEL_LOTE NUMBER, 
  VALOR_M2_TERRENO NUMBER, 
  ID_IMOVEL_UNIDADE NUMBER, 
  MEMBER PROCEDURE INICIAVALORES(PCALCIPTU IN OUT TCALCIPTU) 
) 

Select all

 
CREATE OR REPLACE 
TYPE "TDADOSIMOVELUNIDADE"                                                                                                                                                                                                                                                                                                     AS OBJECT 
( 
  VALOR_VENAL_TERRENO NUMBER, 
  ANO_CADASTRO NUMBER, 
  ANO_CONSTRUCAO NUMBER, 
  AREA_TRIBUTAVEL NUMBER, 
  FRACAO_IDEAL NUMBER, 
  ID_IMOVEL_TIPOLOGIA NUMBER, 
  ID_IMOVEL_TIPO_USO NUMBER, 
  ID_IMOVEL_padrão_ACAB NUMBER, 
  VALOR_VENAL_UNIDADE NUMBER, 
  ALIQUOTA_UNIDADE NUMBER, 
  VALOR_M2_CONSTRUCAO_DESC NUMBER, 
  VALOR_M2_CONSTRUCAO NUMBER, 
  VALOR_FATOR_DEPRECIACAO NUMBER, 
  ID_IMOVEL_UNIDADE NUMBER, 
  ID_CARACT_IMOB_SUBITEM NUMBER 
) 
/ 
 
CREATE OR REPLACE 
TYPE "TLISTAIMOVELUNIDADE" 
AS TABLE OF TdadosimovelUnidade; 
/ 
 
 
And now my procedure that I have to call it in Delphi

Select all

   PROCEDURE Get_Valor_m2_Construcao ( 
      PCalcIPTU            IN      TCalcIPTU 
    , PListaImovelUnidade  IN OUT  TListaImovelUnidade 
    , PIndexLista          IN      NUMBER 
   );

Thanks from now

Henrique Machado Muller
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Henrique,

I am responding to this old topic still open, in case other forists come across the same problem.

I am not a specialist in Delphi, but from what I could research on the subject, you will not be able to do this
(arrays as parameters) only with the basic features of the product.

There are some libraries that you can use in conjunction with Delphi that would allow you to work with arrays. Below is the link of one of these products. I am putting him here more as an example of what exists
on the market, not knowing how to do it if the product is good or not:


tantias forists here that they know Delphi can present other suggestions or tips.

Hugs,

Sergio Coutinho
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests