Menu

deleteAll in CPersistentObject

2004-10-01
2013-03-07
  • Marcos Flavio de Oliveira

      ''' -----------------------------------------------------------------------------
      ''' <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

     
    • Richard Banks

      Richard Banks - 2004-10-02

      Hi Marcos,

      Thanks for the code.  I'll add it shortly :-)

      - Richard.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.