tailieunhanh - Oracle Built−in Packages- P71
Oracle Built−in Packages- P71: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk The value you provided for the open_mode parameter in was invalid. It must be A R or W. INVALIDFILEHANDLE The file handle you passed to a UTL_FILE program was invalid. You must call to obtain a valid file handle. INVALIDOPERATION UTL_FILE could not open or operate on the file as requested. For example if you try to write to a read-only file you will raise this exception. READ_ERROR The operating system returned an error when you tried to read from the file. This does not occur very often. WRITEERROR The operating system returned an error when you tried to write to the file. This does not occur very often. INTERNAL_ERROR Uh-oh. Something went wrong and the PL SQL runtime engine couldn t assign blame to any of the previous exceptions. Better call Oracle Support Programs in UTL_FILE may also raise the following standard system exceptions NODATAFOUND Raised when you read past the end of the file with . VALUE_ERROR Raised when you try to read or write lines in the file which are too long. The current implementation of UTL_FILE limits the size of a line read by to 1022 bytes. INVALIDMAXLINESIZE Oracle and above raised when you try to open a file with a maximum linesize outside of the valid range between 1 through 32767 . In the following descriptions of the UTL_FILE programs I list the exceptions that can be raised by each individual program. UTL_FILE nonprogram elements When you open a file PL SQL returns a handle to that file for use within your program. This handle has a datatype of currently defined as the following TYPE IS RECORD id BINARY_INTEGER As you can see is actually a PL SQL record whose fields contain all the information about the file needed by UTL_FILE. However this information is for use only by the UTL_FILE package. You will reference the handle but not any of the individual fields
đang nạp các trang xem trước