[fdo-users] How to retrieve the Oracle Spatial Data

Haris Kurtagic haris at sl-king.com
Fri Oct 31 10:25:52 EDT 2008


FDOReader returned by "sel.Execute();" is NULL ?

 

I would suspect class name is not valid.

 

Haris

 

From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Shaik Esu
Sent: Friday, October 31, 2008 1:55 PM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] How to retrieve the Oracle Spatial Data

 

"IFeatureReader FDOReader" is returning null value...

 

 

 

 

 

 

 

Regards,

Shaik Esu,

Sr Software Engineer,

Infotech Enterprises Ltd,

Extn: 740.

Mobile +91 9849538712.

________________________________

From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Donald Cameron
Sent: Friday, October 31, 2008 6:03 PM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] How to retrieve the Oracle Spatial Data

 

What is the error message?

 

From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Shaik Esu
Sent: Friday, October 31, 2008 12:04 AM
To: 'FDO Users Mail List'
Subject: [fdo-users] How to retrieve the Oracle Spatial Data

 

Hi All,

 

I want to retrieve the Geometry stored in oracle spatial.

 

I have written the below code 

 

        private IProviderRegistry FDORegistry =
FeatureAccessManager.GetProviderRegistry();

        private IConnectionManager FDOManager =
FeatureAccessManager.GetConnectionManager();

        private IConnection FDOConnection =
FeatureAccessManager.GetConnectionManager().CreateConnection("OSGeo.King
Oracle.3.3");

        public ConnectionState Constate;

        string featureclsname;

      

        public FDOKingOracleClass(string username,string password,string
servicename,string featureclassname)

        {

 

 
FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("Username"
, username);

 
FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("Password"
, password);

 
FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("Service",
servicename);

 
FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("OracleSch
ema", servicename);

 
FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("KingFdoCl
ass", featureclassname);

            featureclsname = featureclassname;

 

           Constate =  FDOConnection.Open();

        }

 

 

I am able to open the connection without any error... but I could not
able to retrieve the geometry collection.

 

I am getting the error in below code....

 

 

      public GeometryCollection SelectAllQuery()

        {

            GeometryCollection Geo_Collection = new
GeometryCollection();

            try

            {

                ISelect sel =
(ISelect)FDOConnection.CreateCommand(OSGeo.FDO.Commands.CommandType.Comm
andType_Select);

                sel.SetFeatureClassName(featureclsname);

                //  sel.LockType =
OSGeo.FDO.Commands.Locking.LockType.LockType_Unsupported;

 

 

                IFeatureReader FDOReader = sel.Execute();

                 FgfGeometryFactory gFac = new FgfGeometryFactory();

                while (FDOReader.ReadNext())

                {

                    Byte[] Tmppts = FDOReader.GetGeometry("Geometry");

 
Geo_Collection.Add(gFac.CreateGeometryFromFgf(Tmppts));

                }

 

            

            }

            catch(OSGeo.FDO.Common.Exception ex)

            {

                MessageBox.Show(ex.Message.ToString());

                

            }

            return Geo_Collection;

        }

 

 

 

 

If anybody has the code to retrieve the spatial data, please help me.

 

 Thank You,

 

 

 

Regards,

Shaik Esu,

Sr Software Engineer,

Infotech Enterprises Ltd,

Extn: 740.

Mobile +91 9849538712.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20081031/d408691c/attachment-0001.html


More information about the fdo-users mailing list