[fdo-dev] Enumerating connection properties

Romica Dascalescu Romica.Dascalescu at autodesk.com
Mon Oct 23 18:00:04 EDT 2006

Hi Mateusz,

MySQL: DataStore property is enumerable but you will be able to get the
values only if you are in pending state with the connection.
If you are not connected to a server you can not take the schemas!


-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Monday, October 23, 2006 5:37 PM
To: dev >> fdo-dev
Subject: [fdo-dev] Enumerating connection properties


I'd like to ask for clarification of behavior of connection
properties API when using RDBMS provider, ie. existing OSGeo.MySQL3.2

The main question is:

Do I need to open a connection before I call
FdoIConnectionPropertyDictionary::EnumeratePropertyValues() ?

I believe I know the overall procedure in details,
but I'm not sure I understand how the EnumeratePropertyValues()
is expected to work.

I CreateConnection(), next GetConnectionInfo() and finall fetch
properties using GetConnectionProperties().
Now, I loop through properties and check if given every property
IsPropertyEnumerable() and if it is, then I call
EnumeratePropertyValues() to fetch
a) number of enumerable values of partibular property and
b) pointer to array, if there are any elements available

Note, that I have not called Open() to open connection yet.

Now, the problem is every time I call EnumeratePropertyValues()
(for property that is enumerable) following exception is thrown:

"Connection not established"

I tracked the call chain and for RDBMS provider, the exception is thrown
from FdoRdbmsConnectionPropertyDictionary::EnumeratePropertyValues()
In lines 37-38, following condition is FALSE:

if((mConnection == NULL)
   || (mConnection->GetConnectionState() == FdoConnectionState_Closed))
     throw FdoCommandException::Create(NlsMsgGet(FDORDBMS_13,
                                "Connection not established"));

I don't understand why EnumeratePropertyValues() expects the connection
has been established. According to FDO Dev Guide, the Open() action is
executed in Step 5 (Page 37) and looping connection properties, not

Am I missing something?

p.s. Please, if my question is not clear or unanswerable,
I'd appreciate a note about it, then I will have a chance to explain
it clearer.

Mateusz Loskot

To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org

More information about the Fdo-internals mailing list