Retrieve storedprocedure messages using JPA [message #782393] |
Mon, 23 January 2012 11:35  |
Eclipse User |
|
|
|
Hello All:
I have a stored procedure which prints messages. I am using JPA named query to execute the same. However, I could not find a construct within JPA that will allow me to capture the messages from the stored procedure.
Here is my sample procedure:
********************************
create proc test
@text varchar(255)
AS
declare
@col int
SELECT @col=col
FROM table
WHERE text=@text
IF @@error != 0 BEGIN
print 'Invalid text'
return -100
END
return 1
go
********************************
How do I get the message 'Invalid text' using JPA?
I appreciate all your help.
Thanks
Sridhar
|
|
|
|
Powered by
FUDForum. Page generated in 0.07931 seconds