获取当前行中的列数。
[Visual Basic]
Public ReadOnly Property FieldCount As Integer
[C#]
public int FieldCount {get;}
[C++]
public: __property int get_FieldCount();
[JScript]
public function get FieldCount() : int;
当未定位在有效记录集中时为 0,否则为当前记录中的列数。缺省值为 -1。
| 异常类型 | 条件 |
|---|---|
| NotSupportedException | 当前没有与数据库的连接。 |
在执行不返回行数的查询之后,FieldCount 返回 0。