Skip to main content

 
developerWorks
AIX and UNIX
IBM Systems
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Workplace
Architecture
Autonomic computing
Grid computing
Java™ technology
Linux
Open source
Power Architecture™
SOA and Web services
Web development
XML
Feedback


developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate

RE: Clear Deletion Stubs with LotusScript
Rod Whiteley 25.Apr.02 09:43 Lotus Notes
Domino Designer -- LotusScript 5.0.8 Windows NT


Yes, by calling API fnctions. Here is experimental code for Windows:


    Const wAPIModule = "NNOTES" ' Windows/32

    Declare Private Sub IDDestroyTable Lib wAPIModule Alias "IDDestroyTable" _
    ( Byval hT As Long)
    Declare Private Function
    IDScan Lib wAPIModule Alias "IDScan" _
    ( Byval hT As Long, Byval F As Integer, ID As Long) As Integer

    Declare Private Function
    NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" _
    ( Byval P As String, hDB As Long) As Integer
    Declare Private Function
    NSFDbClose Lib wAPIModule Alias "NSFDbClose" _
    ( Byval hDB As Long) As Integer
    Declare Private Function
    NSFDbGetModifiedNoteTable Lib wAPIModule Alias "NSFDbGetModifiedNoteTable" _
    ( Byval hDB As Long, Byval C As Integer, Byval S As Currency, U As Currency, hT As Long) As Integer

    Declare Private Function
    NSFNoteDelete Lib wAPIModule Alias "NSFNoteDelete" _
    ( Byval hDB As Long, Byval N As Long, Byval F As Integer) As Integer

    Declare Private Function
    OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" _
    ( Byval NullPort As Long, Byval Server As String, Byval FIle As String, Byval PathNet As String) As Integer

    Declare Private Sub
    TimeConstant Lib wAPIModule Alias "TimeConstant" _
    ( Byval C As Integer, T As Currency)

    Sub
    ClearDeletionStubs(db As NotesDatabase)
    With
    db
    np$
    = Space(1024)
    OSPathNetConstruct 0, db.Server, db.FilePath, np$
    End With

    Dim
    hDB As Long
    NSFDbOpen np$, hDB

    Dim ever As Currency, last As Currency
    TimeConstant 2, ever

    Dim hT As Long
    NSFDbGetModifiedNoteTable hDB, &H7FFF, ever, last, hT

    Dim RRV As Long
    n& = 0
    done
    = (IDScan(hT, True, RRV) = 0)
    While Not
    done
    If RRV < 0 Then
    NSFNoteDelete hDB, RRV And &H7FFFFFFF, &H0201
    n&
    = n& + 1
    End If
    done = (IDScan(hT, False, RRV) = 0)
    Wend

    IDDestroyTable hT

    NSFDbClose hDB

    Messagebox "Deleted " & Cstr(n&) & " stubs"
    End Sub



Clear Deletion Stubs with LotusScri... (Tom Dover 24.Apr.02)
. . RE: Clear Deletion Stubs with Lotus... (Benedict R Pool... 24.Apr.02)
. . RE: Clear Deletion Stubs with Lotus... (Rod Whiteley 25.Apr.02)
. . . . RE: Clear Deletion Stubs with Lotus... (Haydn Parker 25.Apr.02)
. . . . . . RE: Clear Deletion Stubs with Lotus... (Rod Whiteley 25.Apr.02)
. . . . . . . . RE: Clear Deletion Stubs with Lotus... (Tom Dover 30.Apr.02)
. . . . RE: Clear Deletion Stubs with Lotus... (Michael M. Mo 19.May.05)
. . . . . . RE: Clear Deletion Stubs with Lotus... (Scott Leis 3.Oct.05)
. . . . RE: Clear Deletion Stubs with Lotus... (Joey Picinich 18.Sep.06)



Lotus Software


  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Sandbox
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM accelerators
IBM Composite Applications
IBM Mashup Center
Lotus Connections
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Forms
Lotus Foundations
Lotus iNotes
Lotus Mobile Connect
Lotus Notes
Lotus Notes Traveler
Lotus Quickr
Lotus Sametime
Lotus Symphony
Lotus Web Content Management
Lotus Workforce Management
WebSphere Dashboard Framework
WebSphere Portal
WebSphere Portlet Factory

 Lotus Forums
Notes/Domino 8.5
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
Lotus ActiveInsight
Lotus Component Designer
Lotus Connections
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Forms
Lotus Labs
Lotus Mobile Connect
Lotus Quickr
Lotus Sametime
Lotus Sametime Unyte Events
Lotus Sametime Unyte Meeting
Lotus Sametime Unyte Share
Lotus SmartSuite
Lotus Symphony
Lotus Web Content Management
Lotus Widget Factory
Lotus Workflow