Home » Developer & Programmer » Forms » How to read contents of a file as a string in Forms
How to read contents of a file as a string in Forms [message #87487] Fri, 07 January 2005 05:45 Go to next message
aruna
Messages: 33
Registered: January 2002
Member
I have to read contents of a file as string and pass it to a procedure thru Forms9i.

Oracle 9i
Forms9i

Any help would be greatly appreciated

Thanks
Aruna.
Re: How to read contents of a file as a string in Forms [message #87500 is a reply to message #87487] Sat, 08 January 2005 00:31 Go to previous messageGo to next message
ashish
Messages: 107
Registered: December 2000
Senior Member
WHAT IS THIS scam project
Re: How to read contents of a file as a string in Forms [message #87501 is a reply to message #87487] Sat, 08 January 2005 01:21 Go to previous message
ashish
Messages: 107
Registered: December 2000
Senior Member
hi

u can use text_io pkg for this..

here the e.g

declare
in_file Text_IO.File_Type; ----file tyoe
linebuf VARCHAR2(80); -----to stroe text read from file
begin

in_file := Text_IO.Fopen('c:file.txt', 'r'); ------ open file

loop ---------- start reading file
text_IO.Get_Line(in_file,linebuf); -----get line from file

/*my screenn field (multipal record field) */:text := linebuf; ------put that line in text

next_record; -----move to next record in data block

end loop; ------end of file

exception
when others then

message('sqlerrm '||sqlerrm);

end;

******************

regards
ashish
Previous Topic: i want to convert D2k 6 forms to D2k 4.5
Next Topic: when-database-record
Goto Forum:
  


Current Time: Thu Sep 19 16:20:42 CDT 2024