db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLSTATE=22003
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
cmdObj.Parameters.Append(prm4);
prm1.size=10;
prm4.Value=mc_id;
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This TestComplete forum probably isn't the best place for db2 support. Did you try finding a db2 forum?
Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Just to double check:
cmdObj.Parameters.Append(prm4);
prm1.size=10;
prm4.Value=mc_id;
Is it a typo to reference prm1 instead of prm4 or not?
/Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
