3

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?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
mwolfe02
  • 387
  • 1
  • 5
  • 11

1 Answers1

3

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.

mwalker
  • 5,752
  • 25
  • 32
  • It seems that I had considered this and that the table in the "spatial" database had different data than that in the "OLE DB" database. It seemed as though changes made in the "spatial" side did not immediately propagate to the "OLE DB" side. I rechecked just now, though, and it no longer seems to be an issue. Maybe there was some caching taking place in a third-party app or maybe I'm just mis-remembering. Is there a third possibility I'm not considering? – mwolfe02 Jan 06 '12 at 17:37
  • If you're using versioned SDE then you may not see changes right away, since versions are handled with delta tables and views. The source tables won't get updated until the version is reconciled. – mwalker Jan 06 '12 at 18:20
  • This might be the issue. I don't actually work with the GIS system directly, I just consume some of the data in a read-only role. The head of our 3-person GIS dept was let go suddenly and the two people left to pick up the pieces never touched the admin side of things. I'll ask them about reconciling and see if I get blank stares or not. Thanks. – mwolfe02 Jan 06 '12 at 18:49
  • Thanks for your help. I'm having trouble figuring out how to reconcile a versioned database with only one version, though. I posted a follow-up question here: Reconcile a Versioned Geodatabase with only the DEFAULT version – mwolfe02 Jan 06 '12 at 19:48