Provider Binder Objects

OLE DB Programmer's Reference

Every OLE DB 2.5-compliant provider that implements direct URL binding is required to implement a provider binder. If the provider sets the DBPROPVAL_OO_DIRECTBIND value of DBPROP_OLEOBJECTS, the consumer can assume that direct binding is supported.

As in the case of the root binder object, IDBBinderProperties::GetProperties is used to determine the current values of OLE DB properties on the provider binder object. This interface also has a SetProperties method. However, rather than setting properties on the provider binder object directly, the consumer normally calls SetProperties to set these properties on the root binder, which in turn sets the properties of the provider binder object.

For the root binder to know when to route URLs to a given provider, each provider must register its provider binder object to handle a portion of the URL namespace. The root binder will invoke the provider binder whose registered namespace most closely matches the URL to be bound. For more information about the format and syntax of URLs, see RFC 1738, Uniform Resource Locators (URL). You can find this document at http://www.ietf.org/rfc/rfc1738.txt.

Only one OLE DB provider can be registered for the same portion of the URL namespace. If the consumer needs to map a set of URLs to more than one provider (for example, depending on online or offline status) or if a provider needs to service a set of URLs differently under different circumstances, this must be accomplished through application-specific or provider-specific behavior.

Note   The URL scheme and prefix combination ("myscheme://myserver/myprefix") is not case-sensitive. This means you cannot have the same mappings to different providers; "myscheme://myserver/myprefix" is the same as "MyScheme://MyServer/MyPrefix". For IBindResource::Bind and ICreateRow::CreateRow, the URL-to-provider mapping will handle any URL in any case that begins with this scheme and prefix combination.

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