I'm using ArcGIS Desktop 10 and have no experience using Python with a SQL Server ArcSDE database. When using a shp file or file gdb it is very simple to reference a given feature class by simply typing the file path to that file or gdb. However, this seems to be much different when working with mdf files with SQL Server. I can't find any help with this in the resource center. I did read some about making a arcsde connection but I had no luck with that. Any help with the Python code to do this would be a great help.
1 Answer
The way you typically connect to feature classes on an ArcSDE database in Python is to first create a SDE connection file using ArcCatalog or the CreateArcSDEConnectionFile_management
command in arcpy.
Then simply reference the feature class through it's Catalog Path (the path you see in ArcCatalog when you browse to an SDE feature class).
See this related question: How does one access a featurelayer in SDE via Python?
-
Thanks for your help and direction. So I seem to be having a new problem now, I can't get the GP tool for the ArcSDE file creation to see the server connection. I started a new question here: gis.stackexchange.com/questions/14227/…– wilbevCommented Sep 1, 2011 at 17:49