Rowsets

行集(Rowsets)

行集是一个重要的对象,它使OLE DB组件以表格形式导出(expose)及操作数据。行集对象是行的集合,每行由数据列构成。

CoType TRowset {
   [mandatory]   interface IAccessor;
   [mandatory]   interface IColumnsInfo;
   [mandatory]   interface IConvertType;
   [mandatory]   interface IRowset;
   [mandatory]   interface IRowsetInfo;
   [optional]    interface IChapteredRowset;
   [optional]    interface IColumnsInfo2;
   [optional]    interface IColumnsRowset;
   [optional]    interface IConnectionPointContainer;
   [optional]    interface IDBAsynchStatus;
   [optional]    interface IGetRow;
   [optional]    interface IRowsetChange;
   [optional]    interface IRowsetChapterMember;
   [optional]    interface IRowsetCurrentIndex;
   [optional]    interface IRowsetFind;
   [optional]    interface IRowsetIdentity;
   [optional]    interface IRowsetIndex;
   [optional]    interface IRowsetLocate;
   [optional]    interface IRowsetRefresh;
   [optional]    interface IRowsetScroll;
   [optional]    interface IRowsetUpdate;
   [optional]    interface IRowsetView;
   [optional]    interface ISupportErrorInfo;
   [optional]    interface IRowsetBookmark;
}

创建行集
消费者可以使用如下方法之一获取行集对象:

  • 在当前会晤对象中调用IOpenRowSet::OpenRowset直接创建行集对象。所有提供者都必须支持IOpenRowset接口。
  • 在会晤对象中调用IDBCreateCommand::CreateCommand获取命令对象。然后在命令对象中调用ICommand::Execute。如果只有一个命令,返回结果行。例如一个SQL SELECT语句,ICommand::Execute返回一个行集,或消费者请求了IMultipleResults将返回多个结果对象。
  • 消费者调用方法返回行集或计划行集(schema rowset)例如IColumnsRowset::GetColumnsRowset, IDBSchemaRowset::GetRowset, IViewRowset::OpenViewRowset, 或 ISourcesRowset::GetSourcesRowset.
  • 消费者调用其它方法返回与行集类似的表格式的结果(returns tablular results as a rowset)。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值