Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Exception Handilings?



Exception Handilings?..

Answer / saleem

Is a mechanism provided by pl/sql to detect runtime
errors and process them with out halting the program abnormally
1) pre-defined
2) user-defined.
PRE-DEFINED:
1) cursor_already_open--------attempted to open an already
open cursor.
2) Dup_val_on_index --------attempted to insert a
duplicate values.
3) Invalid_cursor -------- illegal cursor operation
occurred.
4) Invalid_number -------- conversion of character
string to number fails.
5) Login_denied ---------loging on to oracle with
an invalid user name
and password.
6) program_error -------- pl/sql has an internal
problem.
7) storage_error -------- pl/sql ran out of
memory or memory is
corrupted.
8) to_many_row ---------single row select
returned more than one row.
9) value_error --------
arithmetic,conversion,truncation or size

constraint error occurred.
10) zero_devided -------- attempted to divided by
zero.


USER-DEFINED:
Declare : name the exception
Raise : explicitly raise the exception by
using the raise statements
Reference: exception handing section.

The Raise_Application_Error_Procedure:
&#61550; You can use this procedure to issue user-defined error
messages from stored sub programs.
&#61550; You can report errors to your applications and avoid
returning unhandled exceptions.

Raise_Application_Error(error_number,message[,{true/false}]
Error number &#61672; between -20000 to -20999

pragma exception_init?
It tells the compiler to associate an exception with
an oracle error. To get an error message of a specific
oracle error.
Ex: pragma exception_init(exception name, oracle
error number)

Example for Exceptions?
1) Check the record is exist or not?
Declare
E emp% rowtype
Begin
e.empno := &empno;
select * into e from emp where empno
=e.empno;
Dbms_output.putline(?empno? || e.empno);
Exception
When no_data_found then
Dbms_output.putline(e.empno ||?doest
exist?);
End;

2) User defined exceptions?
Define p_dept_desc =?gvreddy?
Define p_dept_number =1236
Declare
E_invalid_dept exception;
Begin
Update departments
Set dept_name=?&p_dept_desc?
Where dept_id =?&p_dept_number?;
If sql% not found then
Raise e_invalid_departments;
End if;
Commit;
Exception
When e_invalid_departments then
Dbms_output.putline(?no such dept?);
End;

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Oracle Apps Technical Interview Questions

How relation will be made between modules in oracle financial?

4 Answers   HCL, Wipro,


What are the files you have used in the part of Conversion and Interfaces?

2 Answers   Tech Mahindra,


Hi, can anybody tell me where is the requirement of Oracle Apps (functional+technical) in industry,Iwant to join there,If possible than call me---9313174232

0 Answers  


What are the Standard Reports and Forms in HRMS?

0 Answers  


where is chandra institute in hyderabad for oracle apps technical training ?

2 Answers  


What is ERP? Architecture of apps?

3 Answers   TCS,


Is that Possible To create package Overloading , If Yes Give any Examples

1 Answers   PWC,


any one can expalin report registration steps?

6 Answers   Infosys,


Oracle E-Business suite?

2 Answers  


What are the tables in GL?

3 Answers   Convergys,


What is the autonomous transaction?give me example?

2 Answers   Cap Gemini,


What does appl_top directory contain?

0 Answers  


Categories
  • Oracle Apps Technical Interview Questions Oracle Apps Technical (547)
  • Oracle Apps Financial Interview Questions Oracle Apps Financial (793)
  • Oracle Apps Manufacturing Interview Questions Oracle Apps Manufacturing (53)
  • Oracle Apps HRMS Interview Questions Oracle Apps HRMS (169)
  • Oracle Apps CRM Interview Questions Oracle Apps CRM (9)
  • Oracle Apps SCM Interview Questions Oracle Apps SCM (141)
  • Oracle Install Base Interview Questions Oracle Install Base (62)
  • Oracle Service Contracts Interview Questions Oracle Service Contracts (101)
  • Oracle Apps AllOther Interview Questions Oracle Apps AllOther (114)