[fdo-dev] Enumerating connection properties
Mateusz Loskot
mateusz at loskot.net
Mon Oct 23 18:41:09 EDT 2006
Hi Greg,
Greg Boone wrote:
> In FDO, some connection properties may be either enumerable while a
> connection is closed while other connection properties may only be
> enumerable once Open() has been called.
That's what I've found quite confusing :-)
The same feature behaves differently depending on actual provider.
> This allows a caller to specify
> a subset of the connection properties in order to find out the valid
> values for the remaining properties. This behavior is defined by the
> provider itself and allows a user to specify a subset of the connection
> properties, connect and then request that the provider enumerate the
> remaining connection property values.
Why there is no interface to ask provider which properties are
connection-less and which require pending connection?
Or does it mean every enumerable property does always need pending
connection?
So, if IsPropertyEnumerable() returns TRUE, then one should not call
FdoIConnectionPropertyDictionary::EnumeratePropertyValues()
if connection is not Open()
> In FDO, we generally refer to this as a multi-stage connection process.
> In these circumstances, Open() will succeed but the connection state is
> not returned as 'Open'. Rather the connection state is returned as
> 'Pending'. This return state tells the user that more information is
> required to complete the connection process.
Yes, I understand the procedure of two-step connection.
> In Oracle, the user is able to specify the service, username and
> password and then call Open(). Since the datastore property has not been
> specified, the connection process in not complete and 'Pending' is
> returned. The user may then enumerate the property values for the
> datastore property. This action will cause the Provider to request this
> information from the server. The generated list is then dynamically
> returned to the caller. The caller may then specify a value from the
> returned list as the final connection property and call Open() again.
> This time the call succeeds with a state of 'Open'.
I just wanted to accomplish simple task: list connection properties
without opening any connection.
So, I wanted to get similar list as in Connection API chapter (page 23)
of The Essential FDO.
If there are any properties available only with open connection (ie.
list of datastores), ok I don't want to list them, but how to detect
such properties?
As I asked above, does IsPropertyEnumerable() indicate such properties?
Thanks for your help!
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Fdo-internals
mailing list