[OSGeo-Discuss] SQL ArcSDE Provider -10.1 - Direct Connect

Andrew Timmins drewtimmins at gmail.com
Sun Nov 4 06:45:27 PST 2012


Hello,
I am very new to FDO, but think I have a handle on things.
I am trying to use the ArcSDE Provider on a SQL Server 2008 Express, SDE
10.1 GeoDatabase.
I have tired using the technique outlined in the link below but with no
success.
http://trac.osgeo.org/fdo/wiki/FdoArcSDEDirectConnect

I keep on getting an error saying "SDEHOME" can not be found.

Below is my C# code to connect, but it fails.


           string hostname= @"localhost";
            string instance = @"sde:sqlserver:localhost\sqlexpress";
            string user= "myUserName";
            string password = "password123";
            string datastore= "Default DataStore";

FDORegistry = FeatureAccessManager.GetProviderRegistry();
FDOManager = FeatureAccessManager.GetConnectionManager();
FDOConnection =
FeatureAccessManager.GetConnectionManager().CreateConnection("OSGeo.ArcSDE.3.7");

IConnectionPropertyDictionary connectionPropertyDictionary;
connectionPropertyDictionary =
FDOConnection.ConnectionInfo.ConnectionProperties;
connectionPropertyDictionary.SetProperty("Server", hostname);
connectionPropertyDictionary.SetProperty("Instance", instance);
connectionPropertyDictionary.SetProperty("Username", user);
connectionPropertyDictionary.SetProperty("Password", password);
connectionPropertyDictionary.SetProperty("Datastore", datastore);

try
{
 FDOConnection.Open();
}
catch (Exception ex)
{
 throw ex;

}


Any thoughts on how to connect to a 10.1 SDE database

Thanks

Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/discuss/attachments/20121104/cb5ead48/attachment-0002.html>


More information about the Discuss mailing list