Select to view content in your preferred language

ArcGIS 10.0 Python Connect to SDE

5139
10
08-28-2015 01:52 PM
wcESRI
by
Emerging Contributor

Hello,


I am having difficulty connecting to my enterprise geodatabase and reading data.

My code below is unable to read the feature class.

myWorkspace = 'C:/xxx/Connection.sde'
# myWorkspace = 'Database Connections/Connection'

arcpy.env.workspace = myWorkspace

featureClassPath = "myGIS.DBO.myData"

print (str(arcpy.Exists(featureClassPath)));

When I log into ArcMap I usually have to click on my SDE connection before it just opens.

What am I missing?

0 Kudos
10 Replies
wcESRI
by
Emerging Contributor

Strangely, this code will run fine in ArcMap but not when I run it through IDLE.

0 Kudos