Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL-SQL get_line, Help me
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);
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 ) ;
Somebody with already have the same problem, and how to solve it.
Thank you in advance.
To afflict for my bad English Received on Wed Feb 23 2000 - 03:05:11 CST
![]() |
![]() |