[fdo-users] MySQL Problem

Cary Peebles Cary.Peebles at pb.com
Mon Mar 23 21:08:35 EDT 2009

Hi, I am having trouble getting my FDO and MySQL environment set up properly. I have installed MySQl 5.0 and 5.1 and I've tried FDO 3.2.2, 3.3.0, and 3.3.2 and I cannot yet get an open connection. I am able to use the MySQL Administrator to connect so I know the server, user name, and pwd are right.
<br><br>I initially had problems with the provider unable to load libmysql.dll. I found some posts indicating that I should use an older version of this dll which I did and I was able to get further. I'm using C# and the code below. I would like to list out the datastores so I know what is available for me to use and the Execute method throws an exception:
<br>&nbsp; &nbsp; &nbsp; &nbsp; OSGeo.FDO.Common.Exception: RDBMS: Invalid object type to describe. 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;at OSGeo.FDO.Commands.DataStore.IListDataStoresImp.Execute()
<br><br>IConnection connection = fdoConnectionManager.CreateConnection(&quot;OSGeo.MySQL.3.3&quot;);
<br>IConnectionInfo connectionInfo = connection.ConnectionInfo;
<br>IConnectionPropertyDictionary connectionProperties = connectionInfo.ConnectionProperties;
<br>connectionProperties.SetProperty(&quot;Service&quot;, &quot;capeeble-w1&quot;);
<br>connectionProperties.SetProperty(&quot;Username&quot;, &quot;root&quot;);
<br>connectionProperties.SetProperty(&quot;Password&quot;, &quot;mysql&quot;);
<br><br>ConnectionState Constate = connection.Open();
<br><br>using (IListDataStores dlist = connection.CreateCommand(CommandType_ListDataStores) 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as IListDataStores)
<br>&nbsp; &nbsp; &nbsp; &nbsp; using (IDataStoreReader reader = dlist.Execute()) // Exception thrown here!
<br>&nbsp; &nbsp; &nbsp; &nbsp; {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (reader.ReadNext())
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; }
<br><br>Any help would be appreciated. Any small sample client C# project for MySQL would be great.
View this message in context: http://n2.nabble.com/MySQL-Problem-tp2524291p2524291.html
Sent from the FDO Users mailing list archive at Nabble.com.

More information about the fdo-users mailing list