Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can I read/write OS Files from Forms?
How can I read/write OS Files from Forms?
✍: Guest
OS files can be read/written from Forms using the TEXT_IO package in Forms. The TEXT_IO package has a datatype FILE_HANDLE. It also has procedures FCLOSE, GET_LINE, NEW_LINE, PUT, PUT_LINE & PUTF and a function FOPEN. Example:
DECLARE
file1 TEXT_IO.FILE_TYPE;
file2 TEXT_IO.FILE_TYPE;
str VARCHAR2(80);
BEGIN
file1 := TEXT_IO.FOPEN( 'input.txt','r' );
file2 := TEXT_IO.FOPEN( 'output.txt', 'w' );
TEXT_IO.GET_LINE( file1, str );
TEXT_IO.PUT_LINE( file2, str );
TEXT_IO.FCLOSE( file1 );
TEXT_IO.FCLOSE( file2 );
END;
2011-05-03, 5675👍, 0💬
Popular Posts:
How To Control Table Widths? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells Usually, b...
How do we host a WCF service in IIS? Note: - The best to know how to host a WCF in IIS is by doing a...
How To Check the Oracle TNS Settings? - Oracle DBA FAQ - ODBC Drivers, DSN Configuration and ASP Con...
What Is a CAPTION Tag/Element? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells A "capti...
What's the output of the following program? And why? #include main() { typedef union { int a; char b...