This documentation is archived and is not being maintained.
IDataRecord.FieldCount Property
.NET Framework 1.1
Gets the number of columns in the current row.
[Visual Basic] ReadOnly Property FieldCount As Integer [C#] int FieldCount {get;} [C++] __property int get_FieldCount(); [JScript] 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.
Remarks
After executing a query that does not return rows (for example, using the ExecuteNonQuery method), FieldCount returns -1.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
See Also
IDataRecord Interface | IDataRecord Members | System.Data Namespace
Show: