Solved

Convert int, double to iDB2Numeric

Posted on 2008-10-01
1
480 Views
Last Modified: 2012-05-05
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#
0
Comment
Question by:weimha
1 Comment
 
LVL 5

Accepted Solution

by:
johnaryan earned 500 total points
ID: 22615208
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now