cancel
Showing results for 
Search instead for 
Did you mean: 

db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLSTATE=22003

Highlighted
Occasional Contributor

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;

4 REPLIES 4
Highlighted
Community Hero

Re: db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLST

This TestComplete forum probably isn't the best place for db2 support.  Did you try finding a db2 forum?

Highlighted
Occasional Contributor

Re: db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLST

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. 

Highlighted
Community Hero

Re: db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLST

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.

 

 

Highlighted
Community Hero

Re: db2 stored procedure with decimal datatype gives "CLI0111E Numeric value out of range SQLST

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?

 

Regards,
  /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
================================
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors