IViewFilter::GetFilterBindings

OLE DB Programmer's Reference

Retrieves the bindings used to describe the filter conditions associated with a view.

HRESULT GetFilterBindings(    DBCOUNTITEM   *pcBindings,    DBBINDING    **prgBindings);

Parameters

pcBindings
[out]
A pointer to memory in which to return the number of bindings used to describe the filter criteria. If this method fails or if no filter has been applied to the view, *pcBindings is set to zero.
prgBindings
[out]
A pointer to memory in which to return an array of DBBINDING structures. One structure is returned for each binding used to describe the filter criteria. The provider allocates memory for the structures and returns the address to this memory; the consumer releases this memory with IMalloc::Free when it no longer needs the bindings. If *pcBindings is zero on output or the method fails, the provider does not allocate any memory and ensures that *prgBindings is a null pointer on output. For information about bindings, see "DBBINDING Structures" in Chapter 6: Getting and Setting Data.

Return Code

S_OK
The method succeeded.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
pcBindings or prgBindings was a null pointer.
E_OUTOFMEMORY
The provider was unable to allocate sufficient memory in which to return the binding structures.

Comments

The consumer calls IViewFilter::GetFilterBindings to retrieve information about the columns bound in the current filter. The consumer can use this information in order to create an accessor to be passed into IViewFilter::GetFilter to retrieve the information describing the filter conditions.

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