Represents the REAL DB2® data type. Encapsulates the float .NET data type.
[Visual Basic]
Public Structure DB2Real
[C#]
public struct DB2Real
[C++]
public value class DB2Real
The DB2Real class is only supported for applications with connections to DB2 for Linux, UNIX, or Windows databases.
[C#] The following example demonstrates how to retrieve a single REAL column value from a table.
[C#]
public static string getParam(DB2Connection conn)
{
string mySelectQuery = "SELECT REALCOL FROM TESTTBL";
DB2Command myCommand = new DB2Command(mySelectQuery, conn);
DB2DataReader reader = myCommand.ExecuteReader();
if (reader.Read())
{
DB2Real selectValue = reader.GetDB2Real(0);
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.