读取列数量 - GetColumnCount
函数简介
读取查询结果集中的列数量。
接口名称
GetColumnCount
DLL调用
int GetColumnCount(long ola, long stmt);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| stmt | 长整数型 | 数据库语句对象指针,由 ExecuteReader 接口返回。 |
示例
// 读取查询结果的列数量
int columnCount = GetColumnCount(ola, stmt);
返回值
查询结果集的列数。如果操作失败,返回 0。
注意事项
- 通常与 ExecuteReader 配合使用。
