|
Replies:
2
-
Pages:
1
-
Last Post:
Oct 23, 2009 6:45 AM
by: stevenfeuerstein
|
|
|
Posts:
1
Registered:
10/22/09
|
|
|
|
qem and java
Posted:
Oct 22, 2009 1:53 AM
|
|
|
Hi all,
first of all thank you very much for providing such a good framework to the pl/sql community. I really appreciate using it.
Now to my question. Is there an easy way with qem to pass back an error number and its message to a Java SQLException and displaying the message and the code via the SQLExceptions methods getErrorCode() and getMessage() ?
If I simply call RAISE_APPLICATION_ERROR(-20100,'Emp not found'); I can simply catch this with getErrorCode or getMessage.
With qem the only way to get this information is afaik to call getErrorInfo but this is really hard to access via jdbc.
Any help youd be very appreciated!
Thanks in advance!
Michael
|
|
|
Posts:
425
Registered:
11/13/06
|
|
|
|
Re: qem and java
Posted:
Oct 22, 2009 3:33 AM
in response to: save
|
|
|
Hi
I do not use java to do that, but did you check the help :"Process an error passed back to the host environment" and "Raise an error, passing context information" Topics?
Greetings Filipe
|
"Walking on water and developing software from a specification are easy if both are frozen"
|
|
Posts:
204
Registered:
5/18/06
|
|
|
|
Re: qem and java
Posted:
Oct 23, 2009 6:45 AM
in response to: save
|
|
|
Michael, the Java code can call one of the overloadings of q$error_manager.get_error_info to retrieve the information and display it.
Regards, Steven
|
|
|
|
Legend
|
|
Guru: 2001
+
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|