tanya.bisen

IObjectClassEvents not firing

Discussion created by tanya.bisen on Mar 11, 2013
Latest reply on May 22, 2013 by zhaizhe111
Hello All,

I am using ArcGIS Desktop and ARcSDE 9.3.1 version and trying to extend my featureclass which is coming from ArcSDE geodatabase.

I am using DBMS authentication mode on my Development server while Production server uses OSA authentication mode.

While I try to create a new feature from my featureclass, it doesnot fire IObjectClassEvent_OnCreate function in my ApplicationExtension.vb class file.

Can anybody help me how to debug ApplicationExtension.vb class file and how do IObjectClassEvent_OnCreate function gets called in Visual Studi 2008.

Here is the code snippet :

In my
Private Function SetUpDocumentEvent(ByVal myDocument As IDocument) As Boolean
{
   InitialiseConnection()
}

Sub InitializeConnection()
{
Dim pCLEDObjectClassEvents As IObjectClassEvents_Event
            g_CLEDLayerName = ReadXML("CLEDFeatureClassName")
            g_CLEDFeatureClass = g_FeatureWorkspace.OpenFeatureClass(g_CLEDLayerName)

            If Not g_CLEDFeatureClass Is Nothing Then
                g_CLEDIndex = g_CLEDFeatureClass.FindField("CURRENT_CLED")
                g_CLEDIntrmIndex = g_CLEDFeatureClass.FindField("CLED_INTRM_DATE")
                pCLEDObjectClassEvents = CType(g_CLEDFeatureClass, IObjectClassEvents_Event)

                AddHandler pCLEDObjectClassEvents.OnDelete, AddressOf CLEDObjectClassEvents_OnDelete
                AddHandler pCLEDObjectClassEvents.OnCreate, AddressOf CLEDObjectClassEvents_OnCreate
                AddHandler pCLEDObjectClassEvents.OnChange, AddressOf CLEDObjectClassEvents_OnChange
            End If
}

Sub CLEDObjectClassEvents_OnCreate(ByVal obj As IObject) (This function doesn't get called when I create a new feature)
        Try
            If g_RemoveRuleBase = False Then
                CheckForCLED(obj)
            End If
        Catch ex As Exception
            MsgBox(ex.ToString(), MsgBoxStyle.Information, "CLEDObjectClassEvents_OnCreate")
        End Try
    End Sub

please help, I am new to this.. and have been strugglind since 2 weeks to debug the issue but unsuccessful.

Thanks,
Tanya

Outcomes