Xref: alice comp.databases.oracle.misc:30532
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!nntp2.dejanews.com!nnrp1.dejanews.com!not-for-mail
From: Ondrej 'Andy' Brablc <brablc@my-dejanews.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Pro*C access to table of ... components via SQL*Net
Date: Wed, 05 May 1999 14:53:18 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 57
Message-ID: <7gpm0t$jiu$1@nnrp1.dejanews.com>
References: <7gmmq7$lu$1@nnrp1.dejanews.com> <01be964b$011c5460$190114c1@sister.grant.UUCP>
X-Article-Creation-Date: Wed May 05 14:53:18 1999 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.0; Windows NT)
X-Http-Proxy: 1.1 x10.dejanews.com:80 (Squid/1.1.22) for client 192.127.94.7

In article <01be964b$011c5460$190114c1@sister.grant.UUCP>,
  "Alexander I. Doroshko" <aid@grant.kharkov.ua> wrote:
> With ProC 2.2.3 and Oracle 7.3.4 it works.
> Haven't you tried to rename the Count variable?

I have ProC 2.2.4 and Oracle 8.0.4.2.1 as a remote database.
I tried to rename it and to simplify the problem as much as
possible. So here it is again. I have this package on remote
database

CREATE OR REPLACE Package IFO0018 IS
type t_rec_Currency is record
(
   Currency     varchar2(3),
   Country_name	varchar2(35)
);
type t_tab_rec_Currency is
	table of t_rec_Currency index by binary_integer;
END;
/

And I'm trying to compile this program:

char * connect_string="user/demo@site";

EXEC SQL INCLUDE SQLCA;

main(int argc, char ** argv)
{
   EXEC SQL CONNECT :connect_string;
   EXEC SQL EXECUTE
      declare
         rec_currency IFO0018.t_tab_rec_Currency;
      begin
 	 rec_currency(1).Currency := 'CZK';
	 rec_currency(1).Country_name := 'CZECH REPUBLIC';
 	 DBMS_OUTPUT.put_line(rec_currency.COUNT);
      end;
   END-EXEC;
   EXEC SQL COMMIT WORK RELEASE;
}

I now that DBMS_OUTPUT will do nothing, but it is for me
the easiest way to use COUNT component of rec_currency.
When preprocessing by Pro*C it stops and writes:

PCC-S-02306, wrong number or types of arguments in call to 'COUNT'

The very same thing it will do with LAST or FIRST, NEXT(1) also does not
work. But I could even touch rec_currency(1).Currency. And when running
from inside "sqlplus user/demo@site" it works fine. So it seems to as
a bug or some compatibility error.

        Andy

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
