Provider and Consumer Support for Direct Binding

OLE DB Programmer's Reference

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 Chapter 9: Row and Stream Objects.

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.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net