Condividi tramite


SqlCeCommand.ExecuteReader Method ()

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

Sends the CommandText to the Connection and builds a SqlCeDataReader.

  [Visual Basic]
  Overloads Public Function ExecuteReader() As SqlCeDataReader
[C#]
public SqlCeDataReader ExecuteReader();
[C++]
public: SqlCeDataReader* ExecuteReader();
[JScript]
public function ExecuteReader() : SqlCeDataReader;

Return Value

A SqlCeDataReader object.

Exceptions

Exception Type Condition
InvalidOperationException Cannot execute a command within a transaction context that differs from the context in which the connection was originally enlisted.

Remarks

While the SqlCeDataReader is in use, the associated SqlCeConnection is busy serving the SqlCeDataReader. In this state, you can create multiple readers in the same connection.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeCommand Class | SqlCeCommand Members | System.Data.SqlServerCe Namespace | SqlCeCommand.ExecuteReader Overload List

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

Send comments on this topic.

© Microsoft Corporation. All rights reserved.