Convert int, double to iDB2Numeric

I need to convert an int and a double value to iDB2Numeric to be used in the call to the stored procedure in iDB2.

Does anyone know how to do this?  I'm using C#
weimhaAsked:
Who is Participating?
 
johnaryanConnect With a Mentor Commented:
This site explains the conversion of DB2 types to C, they should be similar to c#.
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.odbc/db2z_numsqc.htm
Once you find out how many bytes a DB2 Numeric value is you can then find out how many bytes an int or decimal uses by using
Console.WriteLine(sizeof(int))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.