system.runtime.interopservices.COMexception(0x80004005) Unspecified error!!

Discussion created by dgesri on Sep 14, 2011
Latest reply on Sep 15, 2011 by jhauck-esristaff

Please note that while I was trying to start and edit session programmatically from a VB.Net code in ArcMap 9.1 SP2. I wonder that I got the following error:

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error at ESRI.ArcGIS.Editor.IEditor.StartEditing(IWorkspace workspace)

Please advise after looking for my below used code:

        Dim pUid As UID
        pUid = New UIDClass
        pUid .Value = "esriEditor.Editor"
        Dim pEditor As IEditor
        pEditor = CType(g_pApp.FindExtensionByCLSID(pUid), IEditor)

        'Check to see if a workspace is already being edited.
        If pEditor .EditState = esriEditState.esriStateNotEditing Then
            pEditor .StartEditing(workspaceToEdit)
            Return True
            Return False
        End If

Please help it is very urgent....