DB2DataReader.GetInt16 Method
Gets the value of the specified column as a 16-bit signed integer.
- Namespace:
IBM.Data.DB2
- Assembly:
IBM.Data.DB2
(inIBM.Data.DB2.dll
)
Syntax
[Visual Basic]
Public Function GetInt16( _
ByVal i As Integer _
) As Short
[C#]
public short GetInt16(
int i
);
[C++]
public: short GetInt16(
int i
);
[JScript]
public function GetInt16(
i : int
) : Int16;
Parameters
- i
- The zero-based column ordinal.
Return value
The value of the specified column as a 16-bit signed integer.
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.SmallInt.
The following
table describes the mapping between the return object data type and
the data server data type.
DB2®Type Data Type | Db2® Data Type | Informix® Data Type |
---|---|---|
SmallInt | SMALLINT | BOOLEAN, SMALLINT |
Call IsDBNull to check for null values before calling this method.