db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLSTATE=22003
I am executing a db2 stored procedure with decimal(10) as the parameter type, i tried with both adDecimal and adNumeric with size as well, still get the same issue, same procedure call in Oracle and MSSQL works fine as the datatype there is integer.
var prm4 = cmdObj.CreateParameter("mc_id", adDecimal, adParamInput);
The issue is only happening when i invoke it from Test complete, it is doesnot occur when i invoke that stored procedure direclty from the DB itself or our applicaiton.
Okay, that's important. Without complete details of your test, it's difficult to guess what might be going on.
If I was troubleshooting this, I would take the "numeric value out of range" and work with that. If you are calculating this value, then try hardcoding it instead and use the value that you think it sending through, for instance, if the calculated value should be 10000, hard code that instead and see if it works. The calculation may not be working the way you think it is.
If the value is stored in a variable, make sure that the variable is of the proper type to give you the answer you expect.
Just to double check:
Is it a typo to reference prm1 instead of prm4 or not?
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.