Friday 29 May 2015

arcgis server - Spatial Database Connection String


From MS Access, I'd like to create a link to the attribute table of an SDE feature class in a spatial database. For example, I have the following connection string which works for an OLE DB connection:


ODBC;DRIVER=SQL Server;SERVER=WCARCSDE00;Trusted_Connection=Yes;DATABASE=MyDb

I want the equivalent connection string for a Spatial Database Connection. Something like the following (which does not actually do what I want because the SERVICE parameter is ignored):


ODBC;DRIVER=SQL Server;SERVER=WCARCSDE00;SERVICE=sde:sqlserver:wcarcsde00;Trusted_Connection=Yes;DATABASE=MyDb


Is this possible? Do I have some fundamental misunderstanding about how this all works?



Answer



MS Access doesn't know what an SDE feature class is, so you don't need to do anything special to connect to a "spatial" database.


Feature class attributes are conveniently stored in tables that match the name of the feature class.


You can directly connect to the underlying SQL database and work with the tables. However, beware of adding new rows or making changes to the identity fields (OBJECTID or FID) - SDE won't like that at all.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...