[fdo-users] fdo 3.3

Jani Prakshep S/O BharatB prakshep_b_jani at yahoo.com
Thu Mar 6 09:01:43 EST 2008

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.

More information about the fdo-users mailing list