CDataSource::OpenWithServiceComponents

使用 oledb32.dll 中的服务组件打开数据源对象。

HRESULT OpenWithServiceComponents ( 
   const CLSID clsid, 
   DBPROPSET* pPropset = NULL, 
   ULONG ulPropSets = 1  
); 
HRESULT OpenWithServiceComponents ( 
   LPCSTR szProgID, 
   DBPROPSET* pPropset = NULL, 
   ULONG ulPropSets = 1  
);

参数

  • clsid
    [in] 数据提供程序的 CLSID

  • szProgID
    [in] 数据提供程序的程序 ID。

  • pPropset
    [in] 对数组的指针包含属性和值的结构将 DBPROPSET。 见属性集和属性组OLE DB程序员参考在Windows SDK。 如果数据源对象已初始化,属性必须属于数据源属性组。 如果相同属性在 pPropset 中多次指定,则提供程序指定其值。 如果 ulPropSets 为零,则忽略此参数。

  • ulPropSets
    [in] DBPROPSET 结构数。pPropSet 参数传递的。 如果此为零,提供程序会忽略 pPropset。

返回值

标准版HRESULT

备注

使用在 oledb32.dll,的服务组件此方法以打开数据源对象;此 DLL 包含服务组件功能的实现 (如合并资源,自动事务登记,依此类推。 有关更多信息,请参见“OLE DB 服务”OLE DB Programmer's Reference 在 https://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbole_db_services.asp?frame=true

要求

标头: atldbcli.h

请参见

参考

CDataSource 类