Provider and Consumer Support for Direct Binding

IBindResource::Bind accepts a set of bind options defining the properties of the requested OLE DB object.

Note

These options must be specified separately for each new call to Bind. For more information, see the reference entry for IBindResource::Bind.

OLE DB 2.5-compliant providers that support direct binding are required to implement IBindResource and ICreateRow on provider binder objects. If the provider does not allow the creation of resources via ICreateRow, it returns E_NOINTERFACE when the consumer calls ICreateRow::CreateRow. IBindResource is used when the URL represents an existing object. When the application needs to create a new row object, ICreateRow is used.

Note

Because all data access in OLE DB is done in the context of one or more sessions, any provider that supports direct binding must also implement IBindResource on the session objects that it provides. This is intended to allow direct navigation to some resource of the provider by using an absolute or relative URL. For more information about navigation in hierarchical data, see Navigating Tree-Structured Namespaces in Row and Stream Objects (OLE DB).

If a provider supports direct binding, it sets the bit DBPROPVAL_OO_DIRECTBIND in the value of the DBPROP_OLEOBJECTS data source object property. If this bit is set, the IBindResource and ICreateRow interfaces are supported on the session object and the provider implements a provider binder object.

Note

IBindResource::Bind can run synchronously or asynchronously. In either case, the consumer can use an initialization step to first register a callback to receive progress notifications or can obtain an IDBAsynchStatus interface on the requested object to poll for status or to cancel the operation.

This topic is a part of: