Export (0) Print
Expand All

SqlCeDataReader.FieldCount Property

Gets the number of columns in the query's SELECT clause.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

public override int FieldCount { get; }

Property Value

Type: System.Int32
When not positioned in a valid recordset, 0; otherwise, the number of columns in the current record.

Implements

IDataRecord.FieldCount

ExceptionCondition
InvalidOperationException

There is no current connection to a data source.

The result of FieldCount will return the number of columns in the query's SELECT clause, even if 0 rows are returned by the query.

Show:
© 2014 Microsoft