AnsweredAssumed Answered

IFeatureWorkspace is empty

Question asked by sondickerson on Nov 13, 2014
Latest reply on Nov 19, 2014 by sondickerson

I'm unable to get a workspace from an sde connection and assign the pFeatureWorkspace to it.  Here's the VB code:



        Dim factoryType As Type = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory")

        Dim pWorkspaceFactory As IWorkspaceFactory2

        Dim pFeatureWorkspaceA As IFeatureWorkspace

        Dim pFeatureWorkspaceB As IFeatureWorkspace

        Dim featureWorkspace As ESRI.ArcGIS.Geodatabase.IFeatureWorkspace


‘thePropSet, theWorkspace, fimWorkspace, fimPropSet are global variables



        pWorkspaceFactory = CType(Activator.CreateInstance(factoryType), IWorkspaceFactory)


           theWorkspace = pWorkspaceFactory.OpenFromFile(theFilesLoc & "dnrgdrs-prod1-pg-dc-pfmm_dev.sde", 0)

       thePropSet = theWorkspace.ConnectionProperties


            fimWorkspace = pWorkspaceFactory.OpenFromFile(theFilesLoc & "\FOR01-ORA-DC-LRSDB-FIM-DEFAULT.sde", 0)

       fimPropSet = fimWorkspace.ConnectionProperties


‘Both of these give empty results           

            pFeatureWorkspaceA = CType(theWorkspace, IFeatureWorkspace)

            pFeatureWorkspaceB = CType(fimWorkspace, IFeatureWorkspace)




The pFeatureWorkspace is always empty. The database has data, but somehow it can't find it.

When debugging, I get "No children available"




Thank you for any advice.