Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C call util_file.fopen.

Re: Pro*C call util_file.fopen.

From: Joe Maloney <mpir_at_compuserve.com>
Date: 2000/03/16
Message-ID: <8ar727$te5$1@nnrp1.deja.com>#1/1

I haven't tried pl/sql blocks within C, so why not declare the file_id field as part of the block instead of the global?

As I thing, that may also be the problem. Usually blocks don't return values.

In article <8ap47q$dhn$1_at_nnrp1.deja.com>, Help(helper) <wangz_at_isd.net> wrote:
> Pro*C call util_file.fopen.
>
> I try to use pro*c to call store proc utl_file.fopen.
>
> Desc utl_file.fopen
>
> FUNCTION utl_file.fopen RETURNS RECORD
> Argument Name Type In/Out Default?
> ------------------------------ ----------------------- ------ --------
> ID BINARY_INTEGER OUT
> LOCATION VARCHAR2 IN
> FILENAME VARCHAR2 IN
> OPEN_MODE VARCHAR2 IN
>
> Question: How do I declare the return variable -ID?
>
> I used the following declare and get errors. Pls see below:
> EXEC SQL BEGIN DECLARE SECTION;
> Int file_id;
> EXEC SQL END DECLARE SECTION;
> ……..
> .
> .
> EXEC SQL EXECUTE
> BEGIN
>
> :file_id:=utl_file.fopen('/u43/ORACLE/apps.cordev03/3.1taxware/w
> ork/',
> 'AVP_TAXcalcuation.out', 'w');
> utl_file.put_line(:file_id,'Start calculate Tax at '||
> to_char(s
> ysdate,'y
> yyy-mm-dd hh:mm:ss'));
> END;
> END-EXEC;
> ..........................1
> (1) PCC-S-02382, expression is of wrong type
>
> I also try to declare as short w/o any luck. I guess my question is
 what
> BINARY_INTEGER type means in pl/sql or C?
>
> --
> Zosen Wang (wangz_at_rocketmail.com)
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--
Joseph R.P. Maloney, CCP,CSP,CDP
MPiR, Inc.
502-451-7404
some witty phrase goes here, I think.


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 16 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US