Connection to ShapeProvider using C#

5 messages Options
Embed this post
Permalink
thabet084

Connection to ShapeProvider using C#

Reply Threaded More More options
Print post
Permalink
Hi all,

I do as steps at the following link to connect to FDO Shape Provider using C#
http://fdo.osgeo.org/files/fdo/docs/FET_TheEssentialFDO/index.html

I got at the  step 2(Create a Connection Manager) exception at runtime

//2-Create connection manager

            OSGeo.FDO.IConnectionManager connManager=OSGeo.FDO.ClientServices.FeatureAccessManager.GetConnectionManager();

exception is : External component has thrown an exception.
I couldnt solve this problem

Also at step 4(Get the Provider Data Store Type) I cannot found class FdoIConnectionInfo</b

Mohammed Thabet Zaky
GIS developer
MSN:thabet084@hotmail.com
Blog: http://www.thabettech.blogspot.com/
Egypt,Cairo
Jackie Ng

Re: Connection to ShapeProvider using C#

Reply Threaded More More options
Print post
Permalink
Are all the FDO dlls, provider dlls and providers.xml copied to the output directory?

- Jackie


Hi all,

I do as steps at the following link to connect to FDO Shape Provider using C#
http://fdo.osgeo.org/files/fdo/docs/FET_TheEssentialFDO/index.html

I got at the  step 2(Create a Connection Manager) exception at runtime

//2-Create connection manager

            OSGeo.FDO.IConnectionManager connManager=OSGeo.FDO.ClientServices.FeatureAccessManager.GetConnectionManager();

exception is : External component has thrown an exception.
I couldnt solve this problem

Also at step 4(Get the Provider Data Store Type) I cannot found class FdoIConnectionInfo
thabet084

Re: Connection to ShapeProvider using C#

Reply Threaded More More options
Print post
Permalink
Hi Jackie ,

I added reference the following dlls
1-OSGeo.FDO
2-OSGeo.FDO.Common
3-OSGeo.FDO.Geometry
4-OSGeo.FDO.Spatial
Note I used FDO 3.4
and this exception is appear at runtime
        private IProviderRegistry FDORegistery = OSGeo.FDO.ClientServices.FeatureAccessManager.GetProviderRegistry();

 SEHexception is unhandled : External component has thrown an exception.
 
and when I try to solve this problem by using FDO 3.3
I found the following exception at the following line
Application.Run(new Form1());
FileNotFoundException was unhandled : The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Mohammed Thabet Zaky
GIS developer
MSN:thabet084@hotmail.com
Blog: http://www.thabettech.blogspot.com/
Egypt,Cairo
Romica Dascalescu

RE: Connection to ShapeProvider using C#

Reply Threaded More More options
Print post
Permalink
Hi,

You need also to copy in your output folder following dlls:
FDO.dll
FDOCommon.dll
FDOGeometry.dll
FDOSpatial.dll

SHPProvider.dll
SHPOverrides.dll

ExpressionEngine.dll

Release:
Xalan-C_1_7_0.dll
XalanMessages_1_7_0.dll
xerces-c_2_5_0.dll

Debug:
Xalan-C_1_7_0D.dll
XalanMessages_1_7_0D.dll
xerces-c_2_5_0D.dll

All these libraries are C++ libraries and are used by .NET dlls(OSGeo.FDO.dll, OSGeo.FDO.Common.dll, OSGeo.FDO.Geometry.dll, OSGeo.FDO.Spatial.dll)

Regards,
Romy.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of thabet084
Sent: Monday, July 06, 2009 10:33 AM
To: [hidden email]
Subject: Re: [fdo-users] Connection to ShapeProvider using C#


Hi Jackie ,

I added reference the following dlls
1-OSGeo.FDO
2-OSGeo.FDO.Common
3-OSGeo.FDO.Geometry
4-OSGeo.FDO.Spatial
Note I used FDO 3.4
and this exception is appear at runtime
        private IProviderRegistry FDORegistery =
OSGeo.FDO.ClientServices.FeatureAccessManager.GetProviderRegistry();

 SEHexception is unhandled : External component has thrown an exception.
 
and when I try to solve this problem by using FDO 3.3
I found the following exception at the following line
Application.Run(new Form1());
FileNotFoundException was unhandled : The specified module could not be
found. (Exception from HRESULT: 0x8007007E)


-----
Mohammed Thabet Zaky
GIS developer
MSN:[hidden email]
Blog:  http://www.thabettech.blogspot.com/
http://www.thabettech.blogspot.com/ 
Egypt,Cairo
--
View this message in context: http://n2.nabble.com/Connection-to-ShapeProvider-using-C--tp3208332p3213342.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
thabet084

RE: Connection to ShapeProvider using C#

Reply Threaded More More options
Print post
Permalink
Hi Romy,

Thank U for your reply that solve my problem
I added these dlls as you told me then all exceptions were disappeared
Xalan-C_1_7_0.dll
XalanMessages_1_7_0.dll
xerces-c_2_5_0.dll
ExpressionEngine.dll

thank you again Romy
Mohammed Thabet Zaky
GIS developer
MSN:thabet084@hotmail.com
Blog: http://www.thabettech.blogspot.com/
Egypt,Cairo