''' -----------------------------------------------------------------------------
''' <summary>
''' Remove all objects for a classe.
''' </summary>
''' <remarks></remarks>
''' <history>
''' [mfo] 27/09/2004 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overridable Sub deleteAll()
Dim obj As CPersistentObject
Dim obRC As CRetrieveCriteria
Dim obCursor As CCursor
obRC = New CRetrieveCriteria
obCursor = obRC.perform(Me)
obRC = Nothing
Do While Not obCursor.EOF
obj = Me.getNewObject
obCursor.loadProxy(obj)
obj.Delete()
obCursor.nextCursor()
Loop
obj = Nothing
obCursor = Nothing
End Sub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
''' -----------------------------------------------------------------------------
''' <summary>
''' Remove all objects for a classe.
''' </summary>
''' <remarks></remarks>
''' <history>
''' [mfo] 27/09/2004 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overridable Sub deleteAll()
Dim obj As CPersistentObject
Dim obRC As CRetrieveCriteria
Dim obCursor As CCursor
obRC = New CRetrieveCriteria
obCursor = obRC.perform(Me)
obRC = Nothing
Do While Not obCursor.EOF
obj = Me.getNewObject
obCursor.loadProxy(obj)
obj.Delete()
obCursor.nextCursor()
Loop
obj = Nothing
obCursor = Nothing
End Sub
Hi Marcos,
Thanks for the code. I'll add it shortly :-)
- Richard.