[fdo-users] .NET FeatureReader and MySQL FDO provider

Robert Fortin robert.fortin at autodesk.com
Mon Jan 15 23:01:00 EST 2007


George,

Dan Stoica has reproduced the problem and log a defect against the MySQL
provider.
We will look into fixing this issue.  We will keep you in the loop when
the fix is available.

Thanks for finding this one!

RF 

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of George McLean
Sent: Saturday, January 13, 2007 7:59 PM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] .NET FeatureReader and MySQL FDO provider

Hello,

I have written an application in .NET that queries a database using an
FDO provider. The application works well when I use the
Autodesk.SqlServer3.1 provider but does some strange things when I use
the OSGeo.MySQL.3.1 provider or the OSGeo.MySQL.3.2 driver.

Specifically, I am having trouble with the GetString method in a
FeatureReader object. When I query data from MySql and loop through the
data set, the GetString method does not appear to clear out the values
from the previous record for the given field. If I have two records with
values of 'ABCDEF' and 'XYZ', the first pass through the loop will set
the value of strValue to 'ABCDEF' but the second pass yields 'XYZDEF'. 
It looks like some sort of buffer is not getting cleared and I am
guessing it is in the MySQL provider. This code works correctly with SQL
Server. Any suggestions?

       Dim DataReader As
Autodesk.Gis.Fdo.Commands.Feature.IFeatureReader
      .................
           DataReader = FdoSelectCmd.Execute()
           While DataReader.ReadNext() = True
                   strValue = ""
                   If DataReader.IsNull("a_text_field") Then
                       strValue = "none"
                   Else
                       strValue = DataReader.GetString("a_text_field")
                   End If
         End While

Thanks

George McLean

_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users



More information about the fdo-users mailing list