Stored Procedure has two output parameter. When I want to read these output parameters, I am getting or Exception
or empty paramateters, while stored procedure always returns something. When I am getting Exception it complains exactly on this code: int temp=call.getInt(16);
But database is always updated.
Can anybody help me with this?
This is the code:
[This message has been edited by Jim Yingst (edited September 05, 2000).]
Originally posted by Carl Trusiak:
What are the data types that the stored procedure returns? If it returns char or varchar, you can't get it with a getInt() even if it always returns a varchar that contains numbers only. Use the getString() and use a conversion method to make it into an int.
One of output parameters is int in the database, so in servlet I register it with call.registerOutParameter(16,Types.INTEGER);
and I am reading it as call.getInt(16)
Another parameter is nvarchar in the database, so I register it in servlet as call.registerOutParameter(17,Types.VARCHAR) and I read it as call.getString(17). So, first output parameter in stored procedure is int and I am reading it as int.
Why it doesn't work? What's wrong here?