TEXT FILE LOADING IN FORM [message #261671] |
Thu, 23 August 2007 05:30  |
musman
Messages: 147 Registered: July 2007 Location: Lahore
|
Senior Member |

|
|
am using this code to load text file in form ..
my text file is like ..
JIM 12000 HOME
ALIAN 34000 RENT
---------------------
Declare
LF TEXT_IO.FILE_TYPE;
LL VARCHAR2(32000) ;
filename varchar2(100);
Begin
begin
filename:=GET_FILE_NAME('c:\', File_Filter=>'Text Files (*.txt)|*.txt|');
LF := TEXT_IO.FOPEN( filename, 'R');
Exception
when others then
message( 'Cannot open file' || 'salary' );
raise ;
End ;
-- OK, file is open --
Begin
-- Read the lines --
Loop
TEXT_IO.GET_LINE( LF, LL ) ;
:MAIN.GET_F := :MAIN.GET_F || LL ;
Text_IO.New_Line;
TEXT_IO.GET_LINE( LF, LL ) ;
:MAIN.GET_F2 := :MAIN.GET_F2 || LL ;
End loop ;
Exception
When no_data_found Then
-- end of file --
TEXT_IO.FCLOSE( LF) ;
End ;
End;
-----------------------------
problem is..This code load [JIM 12000 HOME] in one text field
while i want to load jim in seperate text field,12000 in seperate text field and HOME in seperate field while they are in same line in text file.
How to change that code to do this ..
Can Any one help.Or give some idea.
[Updated on: Thu, 23 August 2007 05:40] Report message to a moderator
|
|
|
|