Represents the DECFLOAT(16|34) DB2® data type. DB2DecimalFloat instances contain floating-point decimal values.
[Visual Basic]
Public Structure DB2DecimalFloat
[C#]
public struct DB2DecimalFloat
[C++]
public value class DB2DecimalFloat
The DB2DecimalFloat structure represents an exact decimal value with floating scale. The maximum of 34 significant digits are stored with complete accuracy.
The DB2DecimalFloat class can store values with the precision set to 34 and can also store values from a DECFLOAT declared with the precision of 16.
[C#] The following example demonstrates how to retrieve a single DECFLOAT column value from a table.
[C#]
public static string getParam(DB2Connection conn)
{
string mySelectQuery = "SELECT DECIMALFLOATCOL FROM TESTTABLE";
DB2Command myCommand = new DB2Command(mySelectQuery, conn);
DB2DataReader reader = myCommand.ExecuteReader();
if (reader.Read())
{
DB2DecimalFloat selectValue = reader.GetDB2DecimalFloat(11);
if (!selectValue.IsNull) { return selectValue.ToString(); }
}
return "NULL";
}
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.