GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  D2K
Go To First  |  Previous Question  |  Next Question 
 D2K  |  Question 6 of 71    Print  
How are text files read and written in forms ?

  
Total Answers and Comments: 5 Last Update: April 29, 2008   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: dmdevaraj
 
To write

Declare
T_filename Text_Io.File_Type;
w_NewLine    varchar2(200);
Begin
T_filename := Text_Io.Fopen('c:test.txt', 'W');
Text_Io.Put_Line(T_filename,'this is test');
Text_Io.Fclose(T_filename);
End;

To Read
Begin
T_filename := Text_Io.Fopen('c:test.txt', 'R');
Text_IO.Get_Line(w_FileHandle, w_NewLine);
Text_Io.Fclose(T_filename);
End;


Above answer was rated as good by the following members:
bc_sumanamara
August 22, 2005 04:15:02   #1  
Naidu. Kondisetty        

RE: How are text files read and written in forms ?
Yes there is a facility UTL_FILE using this package you can read and write data into text files.
Or TEXT_IO package also there.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 01, 2005 18:44:07   #2  
Subhash        

RE: How are text files read and written in forms ?
UTL_FILE is for backend procedures and this writes and reads from DB server while TEXT_IO package is used in forms to read and write from Client machine
 
Is this answer useful? Yes | No
June 22, 2006 10:12:57   #3  
kameshakundy Member Since: April 2006   Contribution: 7    

RE: How are text files read and written in forms ?

In case if you are trying to do the same in Web Deployment then you need to use CLIENT_IO package which is being bundled with WEBUTIL package (in 9i or Higher Versions).


 
Is this answer useful? Yes | No
June 22, 2006 10:14:17   #4  
kameshakundy Member Since: April 2006   Contribution: 7    

RE: How are text files read and written in forms ?
the CLIENT_IO is just a replacement for TEXT_IO since the client-server mechanism is becoming obselete
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 29, 2008 07:14:22   #5  
dmdevaraj Member Since: April 2008   Contribution: 11    

RE: How are text files read and written in forms ?
To write

Declare
T_filename Text_Io.File_Type;
w_NewLine varchar2(200);
Begin
T_filename : Text_Io.Fopen('c:test.txt' 'W');
Text_Io.Put_Line(T_filename 'this is test');
Text_Io.Fclose(T_filename);
End;

To Read
Begin
T_filename : Text_Io.Fopen('c:test.txt' 'R');
Text_IO.Get_Line(w_FileHandle w_NewLine);
Text_Io.Fclose(T_filename);
End;

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape