Op Englesch liesen Editéieren

Deelen iwwer


OdbcDataReader.FieldCount Property

Definition

Gets the number of columns in the current row.

C#
public override int FieldCount { get; }
C#
public int FieldCount { get; }

Property Value

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

Implements

Exceptions

There is no current connection to a data source.

Remarks

Includes hidden fields. Use VisibleFieldCount to exclude hidden fields.

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

Applies to

Produkt Versiounen
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

See also