Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
Have you tried the connection string in Using the ESRI OLE DB provider with a geodatabase? –  Kirk Kuykendall Jan 6 '12 at 17:40
    
@Kirk: No I have not. That would require deploying the ESRI OLE DB provider along with my application, right? –  mwolfe02 Jan 6 '12 at 18:45
    
I've never tried it, but it looks like you'd need to deploy, at minimum, arcengine runtime. –  Kirk Kuykendall Jan 6 '12 at 19:27

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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 6 '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 6 '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 6 '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 6 '12 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.