March 3, 2009 at 10:56 pm
My SP is as below
create procedure ProcGetUserDetails
@user_id varchar(40),
@error_code int OUTPUT,
@error_message char(255) OUTPUT
begin
SET NOCOUNT ON;
BEGIN TRY
select * from users where user_id = @user_id
SET @error_code=0
SET @error_message = 'Success'
SET NOCOUNT OFF
RETURN
END TRY
BEGIN CATCH
BEGIN
SET @error_code=ERROR_NUMBER()
SET @error_message = ERROR_MESSAGE()
RETURN
END
END CATCH
end
When calling this SP from Java gives error "Parameter user_id was not defined for Stored Procedure ProcGetUserDetails"
Surprisingly this error doesn't appear everytime. It appears sometimes and mostly when the DB is blank, that is there is no data in the DB. And after restarting the application, it starts working properly. So what could be the problem ? Is it JDBC driver problem ? Has anyone faced this problem ?
March 4, 2009 at 7:47 am
There doesn't appear to be anything in the SP that would create an error, so, yes it does sound like a java or jdbc problem. I'd ask you to post the Java code, but since I don't program in Java I probably wouldn't be able to help, but then again maybe somebody else can.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy