TAILIEUCHUNG - Oracle PLSQL Language- P5

Tham khảo tài liệu 'oracle plsql language- p5', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | the Oracle architecture allows you to embed many of your business rules directly into your database structure using database triggers constraints and stored procedures. In many cases you will want to let the RDBMS trap and reject invalid database actions. To do this you need a way to identify application-specific errors and return information about those error back to the client. This kind of error communication is illustrated in Figure . Figure Error communication from server to client I have called this type of exception unnamed and programmer-defined. The programmer-defined aspect should be clear because the error is application-specific you cannot expect PL SQL to have already defined it for you. The reason this type of exception is also unnamed is that you cannot name or declare an exception within a server-based program or database trigger and have the client-side tool handle that named exception. This identifier simply doesn t cross the great divide between client and server. To get around this problem Oracle provides a special procedure to allow communication of an unnamed yet programmer-defined server-side exception RAISE_APPLICATION_ERROR. The use of this procedure and exception type is discussed in Section Client-Server Error Communication later in this chapter. The specification for this procedure is as follows PROCEDURE RAISE APPLICATION ERROR error_number_in IN NUMBER error_msg_in IN VARCHAR2 where error_number_in is the error number you have assigned to this error. The error_msg_in argument is the message that will be sent back with the error code to the client program. Previous The Exception Section Oracle PL SQL Programming 2nd Edition Next Determining Exception-Handling Behavior Please purchase PDF Split-Merge on to remove this watermark. The Exception Section Book Index Determining Exception- Handling Behavior The Oracle Library Navigation Copyright c 2000 O Reilly Associates. All rights reserved. Please

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.