Error writing in a file

Advertisement
hello
Can any one tell what's wrong with this code :
PROCEDURE WRITE_ITEM_BLOCK (FILENAME IN VARCHAR2) IS
MYFILE TEXT_IO.FILE_TYPE;
CUR_REC NUMBER;
BEGIN
MYFILE := TEXT_IO.FOPEN('c:\test.text', 'W');
TEXT_IO.PUTF(MYFILE,'this is my first line ');
TEXT_IO.FCLOSE(MYFILE);
GO_RECORD(CUR_REC);
END;
I'm getting the following error :
PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declared
I'm working with an Oracle 10g over W2000 server
Advertisement

Replay

the directory is create ( with the order create directory )Then you have to use directory name, and not the path, that is
FOPEN('c:\test.text', 'W');
should be
FOPEN('<DIRECTORY NAME>', '<file name>', 'W');
and <DIRECTORY NAME> has to be uppercase.