SqlCeDataReader.FieldCount Property

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

Gets the number of columns in the current row.

  [Visual Basic]
  Public Overridable ReadOnly Property FieldCount As Integer  _
   Implements IDataRecord.FieldCount
[C#]
public virtual int FieldCount {get;}
[C++]
public: __property virtual int get_FieldCount();
[JScript]
public function get FieldCount() : int;

Property Value

When not positioned in a valid recordset, 0; otherwise, the number of columns in the current record. The default is -1.

Implements

IDataRecord.FieldCount

Exceptions

Exception Type Condition
InvalidOperationException There is no current connection to a data source.

Remarks

After executing a query that does not return rows, FieldCount returns 0.

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.