asp.net.ph

SqlDataReader.GetInt16 Method

System.Data.SqlClient Namespace   SqlDataReader Class


Returns the value of the specified column as a 16-bit signed integer.

[ VB ]
NotOverridable Public Function GetInt16 ( _
   ByVal index As Integer _
) As Short

[ C# ]
public short GetInt16 (
   int index
);

[ C++ ]
public: __sealed short GetInt16 (
   int index
);

[ JScript ]
public function GetInt16 (
   index : int
) : Int16

Parameters

index
The zero-based column ordinal.

Return Value

The value of the column.

Exceptions


Exception Type Condition
InvalidCastException Occurs when the specified cast is not valid.

Remarks

No conversions are performed, therefore the data retrieved must already be a 16-bit signed integer.

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

See Also

SqlDataReader Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph