Re: Calling stored procedures from an OCI application
From: <dmausner_at_brauntech.com>
Date: Sun, 17 Apr 1994 00:14:25 GMT
Message-ID: <1994Apr16.221533.25178_at_nntpxfer.psi.com>
Date: Sun, 17 Apr 1994 00:14:25 GMT
Message-ID: <1994Apr16.221533.25178_at_nntpxfer.psi.com>
In article <2olndf$o0k_at_hafro.is>, <gunnaro_at_hafro.is> writes:
> create or replace procedure list (n in number, x out number) is
> begin
> select x into x from t where x = n;
> end;
>
> But this dosn't work. It fails when trying to bind the out variable to
> the selected column.
- always show us the ORA error number when complaining about something.
- try declaring: x in out number.
- try using an explicit cursor to save some overhead. a select fetches twice in order to be sure the result set is only one row. cursors don't do that.
create or replace procedure list (n in number, x in out number) is
cursor x_cur (n number) is select x from t where y=n;
begin
open x_cur(n);
fetch x_cur into x;
close x_cur;
end;
/
Received on Sun Apr 17 1994 - 02:14:25 CEST