Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Pro*C proc. call with out param. of type table of rec via SQL*Net
I have problem using procedure call with output
parameter of type table of records via SQL*Net
from Pro*C program.
What I have are this types:
type t_rec_Currency is record
(
Currency varchar2(3), Country_name varchar2(35)
I'm calling a stored procedure ENCR(out C t_tab_rec_Currency) and the only thing I need is number of rows returned.
So I did this:
char * connect_string="user/password_at_site";
EXEC SQL BEGIN DECLARE SECTION;
int Count;
EXEC SQL END DECLARE SECTION;
...
EXEC SQL CONNECT :connect_string;
EXEC SQL EXECUTE
declare
rec_currency t_tab_rec_Currency;
begin
ENCR(rec_currency);
:Count := rec_currency.count;
for i in 1..rec_currency.count loop ... end loop;
USERID=user/password_at_site
PROCPLSFLAGS= sqlcheck=semantic userid=$(USERID) dbms=v6_char
it writes this:
PCC-S-02306, wrong number or types of arguments in call to 'COUNT'
:Count := rec_currency.count;
............1
Does anybody know why I cannot access .count of the otput parameter. There are 8 rows in my environment in this table of rec, and I can see them using this ugly thing:
begin
ENCR(rec_currency);
:Count := 8;
for i in 1..:Count loop ... copy rec_currency(i).Currency somewhere ... end loop;
But I really need the number of rows.
Thanks in advance
Andy
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue May 04 1999 - 06:48:24 CDT