[fdo-users] fdo 3.3

Romica Dascalescu Romica.Dascalescu at autodesk.com
Thu Mar 6 09:10:13 EST 2008

You may want to try:

 iconnection.set_ConnectionString ("DefaultFileLocation=roads.shp"); // here add your connection string with path to your SHP file
FdoConnectionState state = iconnection.Open ();  // Open the connection

In order to open a SHP connection you need to set the connection string and call Open function.


From: fdo-users-bounces at lists.osgeo.org [fdo-users-bounces at lists.osgeo.org] On Behalf Of Jani Prakshep S/O BharatB [prakshep_b_jani at yahoo.com]
Sent: Thursday, March 06, 2008 9:01 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] fdo 3.3

i cou't basic connection establish of fdoshp provider.

pl. give me some example with code

i written my program this way,

package WindowsApplication1;

import System.Collections.Generic.*;
import System.Windows.Forms.*;
import OSGeo.FDO.ClientServices.*;
import OSGeo.FDO.Commands.*;
import OSGeo.FDO.Common.*;
import OSGeo.FDO.Connections.*;
import OSGeo.FDO.*;
import OSGeo.FDO.Connections.IConnectionImp;
import OSGeo.FDO.Providers.SHP.Override.*;

 * Summary description for Program
public class Program
        public static IConnection fdoconnection;
        public static IProviderRegistry  providers_registry;
        public static ProviderCollection providercoll;
        public static Provider provider;
        public static IConnectionManager fdoconnectionmgr;
        public static IConnection iconnection;
        //public static IConnectionImp icon = new IConnectionImp();
                System.out.println("Connection Services Started...... ");

                providers_registry = FeatureAccessManager.GetProviderRegistry();
                providercoll = providers_registry.GetProviders();
                int No_of_registerd_provider = providercoll.get_Count();

                for (int i = 0; i < No_of_registerd_provider; i++)
                        provider = providercoll.get_RealTypeItem(i);
                        String name = provider.get_Name();
                        if ((name.compareTo("OSGeo.SHP.3.2")) == 0)
                                fdoconnectionmgr = FeatureAccessManager.GetConnectionManager();
                                iconnection = fdoconnectionmgr.CreateConnection(name);
                                ConnectionState state = iconnection.get_ConnectionState();
                                IConnectionInfo info = iconnection.get_ConnectionInfo();
                                //ConnectionState state = icon.get_ConnectionState();


                        //String pro_name = provider.get_DisplayName();

         * The main entry point for the application.
        /** @attribute System.STAThread() */
        public static void main(String[] args)
                Program p = new Program();


above code give true information but connection state is shows  CLOSE.

that's why pl. give me some code for any provider. then i go ahead otherwise
i try and try.......but do not get result....
View this message in context: http://www.nabble.com/fdo-3.3-tp15873138s18162p15873138.html
Sent from the fdo-users mailing list archive at Nabble.com.

fdo-users mailing list
fdo-users at lists.osgeo.org

More information about the fdo-users mailing list