Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Pro*C call util_file.fopen.
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
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.Received on Wed Mar 15 2000 - 00:00:00 CST