Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

READ LINE FAILS WITH UTL FILE 1

Status
Not open for further replies.

Palmero

Technical User
Mar 31, 2001
53
0
0
FR
Hi all,

I am populating an Oracle V7.3.4 table from a flat file using the following procedure :

create or replace procedure Charge_produit is
-- declaration of variables
BEGIN
WHILE MY_GET_LINE(file_handle,ligne) LOOP
BEGIN
INSERT INTO TMP_PRODUIT
values (
value1,
value2);

EXCEPTION
WHEN depasse THEN

WHEN INVALID_NUMBER THEN

WHEN OTHERS THEN
END;
END LOOP;
commit;

EXCEPTION
WHEN UTL_FILE.INVALID_PATH THEN

WHEN UTL_FILE.WRITE_ERROR THEN

WHEN UTL_FILE.READ_ERROR THEN

WHEN OTHERS THEN
END;
/

The problem is that the instruction "MY_GET_LINE(file_handle,ligne)" fails in line 4035 of the flat file and then goes to the EXCEPTION "WHEN OTHERS" of the main body, that means the second "WHEN OTHERS". So the file is not completely processed.
How can I proceed to workaround this issue?

Thanks in advance for your help.

Palmero.
 
Palmero,

Are you doing this in Oracle Forms, PL/SQL? What versons
of Forms or PL/SQL ae you using?

What is the code for the program unit, stored procedure, or function named MY_GET_LINE?

If you're using Oracle Forms, inside the "WHEN OTHERS" exception, do you have a message(sqlerrm) or message(dbms_error_text) so that you can see why oracle won't procede? If so, what is the message?

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top