[fdo-users] SDE Error - Cant fine feature class

surrounded Rob.Sosnowski at itd.idaho.gov
Wed Oct 1 10:59:20 EDT 2008


Hi Dan, Thanks

I get the following error when I try this:
    'The connection is already open'

string providerName = getProviderName("arcsdeprovider.dll");
                //OPEN CONNECTION
connection = getSDEConnection(providerName);
connection.ConnectionString = SDEName;   //WHERE SDEName = "Cities".  THIS
IS LINE OF ERROR
OSGeo.FDO.Commands.Feature.ISelect sel =
(OSGeo.FDO.Commands.Feature.ISelect) 
connection.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_Select);


getSDEConnection returns a IConnection:  code below

IConnectionManager connectionManager =
FeatureAccessManager.GetConnectionManager();
IConnection connection = connectionManager.CreateConnection(providerName);
IConnectionPropertyDictionary connectionPropertyDictionary;
connectionPropertyDictionary =
connection.ConnectionInfo.ConnectionProperties;
connectionPropertyDictionary.SetProperty("Server", "server");
connectionPropertyDictionary.SetProperty("Instance", "5151");
connectionPropertyDictionary.SetProperty("Username", "username");
connectionPropertyDictionary.SetProperty("Password", "password");
connectionPropertyDictionary.SetProperty("Datastore", "database");
OSGeo.FDO.Connections.ConnectionState connectState = connection.Open();



surrounded wrote:
> 
> I establish a connection to SDE enterprise geodatabase: 
> 
> I use the following code to access the feature class:
> 
>     connection = getSDEConnection("OSGeo.ArcSDE.3.3");
>     OSGeo.FDO.Commands.Feature.ISelect sel =
> (OSGeo.FDO.Commands.Feature.ISelect
> connection.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_Select);
>                 
>     sel.SetFeatureClassName("Cities");
>     reader = sel.Execute();
> 
> On the sel.Execute I get the following error:
>     Feature class 'Cities' not found in schema.
> 
> 
> Any ideas on why this is happening....Thanks
> 

-- 
View this message in context: http://n2.nabble.com/SDE-Error---Cant-fine-feature-class-tp1131496p1131615.html
Sent from the FDO Users mailing list archive at Nabble.com.



More information about the fdo-users mailing list