Sunitha, One advantage of separating the package specs from the package body file is when you're running multiple package scripts, invalid reference error could be avoided. Suppose we have two package X and Y. Package X references Y. If we have only one file for both body and spec (X.sql and Y.sql), we have to run the Y.sql first before X.sql or else will have an invalid reference error. But it we separate the package spec and body files, we can run the specs file first (X_spec.sql and Y_spec.sql in any order) without considering the reference. Running the X_body.sql and Y_body.sql would then be reference error free since the specifications has been declared. Hth, Remar
Aakash, Your data in the audit log would be rolled back. But if you want the audit log to be committed even the insert/update of the table fails, you can use autonomous transaction pragma, if you're using Oracle8i or above. Hth, Remar [ June 25, 2003: Message edited by: Remar Uy ] [ June 25, 2003: Message edited by: Remar Uy ]
Since this is a procedure and not a function, you have to assign the 'success' and 'failure' to the 'x' variable. But, I think a function would be more appropriate, returning a boolean: