| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL-SQL get_line, Help me
Hi,
The exception you receive is probably related to the = dbms_output.put_line command, which can only handle strings of 255 bytes = max.
Best regards,
Huberto
Chevalier Christophe <Chevalier_at_e-med.ch> schreef in berichtnieuws =
38B3A2C7.F631EB3D_at_e-med.ch...
Hello,
I have a problem with a procedure PL-SQL. I manage to open a textual =
file with method OPEN_FILE and GET_LINE, but if the file that I open =
contains of the lines of more than ~400 car, I have execption.
Also, here the code which I use to open my file.
=
==========================
==========================
==========================
CREATE OR REPLACE procedure L_FILE ( F_NAME in VARCHAR2, F_TYPE IN VARCHAR2 )IS
FILE_OPEN UTL_FILE.file_type;
LIGNE_LU VARCHAR2(2000) :=null ;
BEGIN
FILE_OPEN := UTL_FILE.fopen ( 'e:\temp' , F_NAME , 'r' );
LOOP
BEGIN
UTL_FILE.GET_LINE ( FILE_OPEN , LIGNE_LU );
DBMS_OUTPUT.PUT_LINE (LIGNE_LU);
-- PARSING (LIGNE_LU,TYPE);
EXCEPTION WHEN NO_DATA_FOUND THEN
EXIT;
END;
EXCEPTION
when UTL_FILE.invalid_path then raise_application_error =
( -20100 , 'Invalid path : "') ;
when UTL_FILE.invalid_mode then raise_application_error =
( -20101 , 'Invalid mode' ) ;
when UTL_FILE.invalid_operation then raise_application_error =
( -20101 , 'Write operation' ) ;
when UTL_FILE.INVALID_FILEHANDLE then raise_application_error ( =
-20100 , 'INVALID_FILEHANDLE') ;
when UTL_FILE.READ_ERROR then raise_application_error ( =
-20100 , 'READ_ERROR') ;
when VALUE_ERROR then raise_application_error ( -20100 , =
'VALUE_ERROR') ;
when others then DBMS_OUTPUT.PUT_LINE =
('C''est une autre erreur !!!!!');
UTL_FILE.fclose ( FILE_OPEN ) ;
END;
=
==========================
==========================
==========================
Somebody with already have the same problem, and how to solve it.
Thank you in advance.
To afflict for my bad English Received on Thu Feb 24 2000 - 08:52:28 CST
![]() |
![]() |