Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: calling stored procedure


Message #1 by "yanti fitri eka zalti" <yanti_fitri@l...> on Sun, 26 Nov 2000 18:08:13 -0800
i have stored procedure like this :

create or replace procedure PopBank1( id_bank in varchar2)

is   
    Cursor C1 is    select bank_id from bank_tab where bank_id=id_bank;
    Cursor C2 is select * from bank_tab;
   
VId_Bank  varchar2(5);

VBANK_ID               VARCHAR2(5);
VBANK_NAME        VARCHAR2(50);
VADDRESS               VARCHAR2(30);
VPHONE                   VARCHAR2(20);
VCITY                       VARCHAR2(15);
VZIP_CODE              VARCHAR2(6);
VCOUNTRY_CODE  VARCHAR2(5);   


begin
      Open C1;
      fetch c1 into Vid_bank;
      if c1%found then
          SELECT bank_id, bank_name, address, phone, city, zip_code, country_code 
          INTO  Vbank_id, Vbank_name, Vaddress, Vphone, Vcity, Vzip_code, Vcountry_code 
          FROM Bank_Tab 
          WHERE Bank_id=id_bank;
           
          close C1;
     else
          Open C2;
          loop
               fetch C2 INTO  Vbank_id, Vbank_name, Vaddress, Vphone, Vcity, Vzip_code, Vcountry_code ;
               exit when c2%NotFound;

          end loop;
          Close C2;

     end if;


end popBank1;

do you know how to get the output parameter  ( like VBank_id) to delphi??
please help me thanks


Get FREE Email/Voicemail with 15MB at Lycos Communications at http://comm.lycos.com

  Return to Index