🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1342

ADOStoredProc to Oracle

#1342
From: Patrick Wong
Date: Fri, 23 Jul 2004 07:41
45 lines
2247 bytes
Dear all,

Please advise how should I use the ADOStoredProc to execute a stored
procedure on Oracle8i?

The store procedure is something like:

CREATE OR REPLACE procedure tbl_input( v_out out varchar2, v_id in varchar2,
v_upd in varchar2, v_1 in varchar2:=null
  ,v_2 in varchar2:=null,v_3 in varchar2:=null,v_4 in varchar2:=null,v_5 in
varchar2:=null
  ,v_6 in varchar2:=null,v_7 in varchar2:=null,v_8 in varchar2:=null,v_9 in
varchar2:=null,v_10 in varchar2:=null)
is
  v_date date;
  err_msg varchar2(100);
begin
 v_date := to_date(v_upd,'yyyymmddhh24miss');
  update tbl set timestamp=sysdate,upd =
v_date,n1=v_1,n2=v_2,n3=v_3,n4=v_4,n5=v_5
     ,n6=v_6,n7=v_7,n8=v_8,n9=v_9,n10=v_10 where id=v_id;
  if sql%notfound then
      insert into tbl (timestamp,id,upd,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10)
        values
(sysdate,v_id,v_date,v_1,v_2,v_3,v_4,v_5,v_6,v_7,v_8,v_9,v_10);
      v_out := '00#Insert '||v_id;
  else v_out := '00#Update '||v_id;
  end if;
  commit;
EXCEPTION
 when others then
   rollback;
    err_msg := substr(SQLERRM,1,100);
    v_out := '01#'||v_id||'-'||err_msg;
end ;

I tried a variety of settings in the parameters but continually received the
EOleException with message:
Parameter object is improperly defined. Inconsistent or incomplete
information was provided

Furthermore, how can I inspect the parameter values in debug mode?

Thanks and regards,
Patrick
Technical Details
Message-ID: <4100c075@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,417b0e611df030eb,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Patrick Wong" <patrickwong@computer.org>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADOStoredProc to Oracle
Date: Fri, 23 Jul 2004 15:41:08 +0800
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 203.82.252.252
Message-ID: <4100c075@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1090568309 203.82.252.252 (23 Jul 2004 00:38:29 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail