Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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
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:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
SqlCeDataReader Class | SqlCeDataReader Members | System.Data.SqlServerCe Namespace
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.