This topic has not yet been rated - Rate this topic

SqlCeDataReader.GetSqlDateTime 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 SqlDateTime.

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

Parameters

ordinal
The zero-based column ordinal.

Return Value

A SqlDateTime.

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 date/time value or an exception is generated.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security: 

See Also

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

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.