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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text_io problem

Status
Not open for further replies.

hudo

Programmer
Dec 4, 2003
94
DE
I've displayed scott.emp in a form and would like to export it locally (on the client
machine). I read something about Package TEXT_IO which seems to be included into
Forms, but I do not know how to export the table contents into a csv file (start
export with WHEN-BUTTON-PRESSED trigger).
I use Forms 10g, deployment on the web with AS 10.

Please guide me.
 
if you neeed the contents of a table in a text file you can use a cursor first to retrieve all data, then somthing like this.
text_io.fopen('filename', 'W');
for c . . . loop

Text_IO.Put('filename', SYSDATE);
....
Text_IO.Put('filename', cursor.empno);
Text_IO.New_Line('filename', 2);


end loop;
text_io.fclose('filename');
 
@sem: I would like to write to the client pc.
I thought TEXT_IO writes to the client pc
and UTL_FILE writes to the server machine.
Am I not right here ??
 
TEXT_IO will write to the server on which the FMX resides. So for web forms this will be the middle tier server not the client PC as Dima has already said.

You will need java scripts to write to local PC, which can be downloaded from Oracles OTN site.
 
@lewisp: Can you show me another method (not TEXT_IO) to write to the client machine from forms ?
Which java scripts do you refer in your latest reply ? Can you provide a URL, please ?
 
Webutil for 9i and 10g is available from
You can also 'write' to a client PC by creating a file on the middle tier server, then use WEB.SHOW_DOCUMENT to display the file in a browser session. Most browsers will automatically choose an application to use to display the file depending on its type. eg. for TXT files notepad will be used. For DOCs MS Word is called and Excel for XLS or CVS files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top