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.

I am using ArcObjects to access a GeoDatabase that was set up with ArcSDE 10 and SQL Server 2008 R2. In this particular case, I have some tables set up on alternate schemas (this is to replicate a clients' environment).

The OpenFeatureClass method on the IFeatureWorkspace is working correctly when I access feature classes that are in the default schema (SDE).

That same method will fail, however, when I try to access feature classes on the other schemas. The error I'm getting is "Error HRESULT E_FAIL has been returned from a call to a COM component."

Has anyone had a similar issue? Is there something I should do to ensure the other feature classes are accessible to ArcObjects?

UPDATE

Brad Nesom made a good point in the comments about whether the alternate schema tables are spatial. The table WERE spatial, but for some reason after I changed the schema, they were changed to non-spatial. It's possible that ArcSDE does not allow you to modify schemas for spatial tables.

share|improve this question
1  
if the schema is not "registered" with sde, I think you will have to use alternative methods to access through arcobjects. –  Brad Nesom May 18 '11 at 15:54
    
@Brad - How do you register the schema? As far as I know, sdetable -o register will only work with tables. –  Seth P. May 18 '11 at 17:51
    
I think where I was heading was that maybe an oledb connection or other access method. –  Brad Nesom May 18 '11 at 19:10
    
are these tables on the alternte schema spatial? –  Brad Nesom May 18 '11 at 19:12
    
@Brad - Yes, the other tables are spatial –  Seth P. May 18 '11 at 19:37
show 2 more comments

2 Answers

Assuming you can connect to the geodatabase in arccatalog, you should be able to list the properties in IGxDatabase.WorkspaceName.ConnectionProperties, then use those to devise a method to open the workspace.

share|improve this answer
add comment

Yo can work with with non-SDE schemas without any problem, but the only condition is to register it with SDE. In case your schema has been changed from SDE to something else, a post-installation configuration should help you registering the new schema.

share|improve this answer
add comment

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.