TEXT_IO Package usage [message #161128] |
Thu, 02 March 2006 03:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nirmalnarayan
Messages: 261 Registered: April 2005 Location: India
|
Senior Member |
|
|
Hi,
the following procedure using TEXT_IO package is from the help topics of Oracle Forms 10g. While calling this procedure it is giving non-Oracle error. Anyone can help in this regard ?
PROCEDURE echo_file_contents IS
in_file Text_IO.File_Type;
linebuf VARCHAR2(1800);
filename VARCHAR2(30);
BEGIN
filename:=GET_FILE_NAME('c:/temp/', File_Filter=>'Text Files (*.txt)|*.txt|');
in_file := Text_IO.Fopen(filename, 'r');
LOOP
Text_IO.Get_Line(in_file, linebuf);
:text_item5:=:text_item5||linebuf||chr(10);
--Text_IO.New_Line;
END LOOP;
EXCEPTION
WHEN no_data_found THEN
Text_IO.Put_Line('Closing the file...');
Text_IO.Fclose(in_file);
END;
Nirmal
|
|
|
|
Re: TEXT_IO Package usage [message #161146 is a reply to message #161134] |
Thu, 02 March 2006 04:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nirmalnarayan
Messages: 261 Registered: April 2005 Location: India
|
Senior Member |
|
|
Hi,
I am getting the error as shown in the graphic. I am getting when the button is pressed. And the Button pressed is calling the procedure , which i have posted earlier (As in the Forms10g Help Topics)
![/forum/fa/851/0/](/forum/fa/851/0/)
Thanks and Regards,
Nirmal
-
Attachment: Text_IO.bmp
(Size: 1.16MB, Downloaded 11524 times)
[Updated on: Thu, 02 March 2006 04:31] Report message to a moderator
|
|
|
Re: TEXT_IO Package usage [message #161149 is a reply to message #161146] |
Thu, 02 March 2006 04:41 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orausern
Messages: 826 Registered: December 2005
|
Senior Member |
|
|
no, i can't figure out the exact cause,but looking at your procedure code, there seems to be something wrong the way you are calling the procedure:
filename:=GET_FILE_NAME('c:/temp/', File_Filter[B]=>[/B]'Text Files (*.txt)|*.txt|');
just as you set the paramater of File_Filter with => symbol, you have to do the same for the first parameter c:/temp/
also check the existance ofthe directory and file and permissions to it.
[Updated on: Thu, 02 March 2006 04:42] Report message to a moderator
|
|
|
|