DB2 Version 10.1 for Linux, UNIX, and Windows

DB2Record.GetFloat Method

Gets the value of the specified column as a single-precision floating-point number.

Namespace:
IBM®.Data.DB2®
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax

[Visual Basic]
Public Function GetFloat( _
   ByVal i As Integer _
) As Single
[C#]
public float GetFloat(
   int i
);
[C++]
public: float GetFloat(
   int i
);
[JScript]
public function GetFloat(
   i : int
) : float;

Parameters

i
The zero-based column ordinal.

Return value

The value of the specified column as a single-precision floating-point number.

Exceptions

Exception type Condition
InvalidCastException The specified cast is not valid.
DB2Exception Invalid conversion.

Remarks

No conversions are performed. The data to be retrieved must be of DB2Type.Real.

The following table describes the mapping between the return object data type and the data server data type.
DB2Type Data Type DB2 Data Type Informix® Data Type
Real REAL REAL, SMALLFLOAT

Call IsDBNull to check for null values before calling this method.