Freigeben über


SqlCeDataReader.GetSqlInt16 Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets the value of the specified column as a SqlInt16.

  [Visual Basic]
  Public Function GetSqlInt16( _
   ByVal 
  ordinal
   As Integer _
) As SqlInt16
[C#]
public SqlInt16 GetSqlInt16(int ordinal
);
[C++]
public: SqlInt16 GetSqlInt16(int ordinal
);
[JScript]
public function GetSqlInt16(
   ordinal : int) : SqlInt16;

Parameters

  • ordinal
    The zero-based column ordinal.

Return Value

A SqlInt16.

Exceptions

Exception Type Condition
InvalidOperationException The operation is not valid. The SqlCeDataReader may be positioned after the last row in the result set.

Remarks

No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer or an exception is generated.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeDataReader Class | SqlCeDataReader Members | System.Data.SqlServerCe Namespace

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.