Auf dieser Website werden Cookies gesetzt, die für den sicheren Betrieb technisch erforderlich sind. Siehe: Datenschutz

SnTT: Is database design hidden

by Bernd,
assono GmbH, Standort Hamburg,


Show-n-Tell Thursday The other day I had to find out whether the design of an database application is hidden. Unfortunatly there is no property in LotusScript for that. In the end DXL did the trick.

If you export the design of an database application with hidden design only the base information about the database will be there. No single design element is listed. So just be searching for an entry "<form>" can be figured out whether the design is hidden. The only false possitiv will be Notes databases applications without any form at all. But I think that is unlikely.


Function isDesignHidden(db As NotesDatabase) As Boolean

On Error Goto err_handler

Dim session As New NotesSession
Dim DXLExporter As NotesDXLExporter
Dim ncl As NotesNoteCollection
Dim dxlOutput As String


'Input
Set ncl = db.CreateNoteCollection(False)
ncl.SelectForms = True
Call ncl.BuildCollection

Set DXLExporter = session.CreateDXLExporter
DXLExporter.ExitOnFirstFatalError = True
dxlOutput = DXLExporter.Export(ncl)

If Instr(1, dxlOutput, "<form", 1) <> 0 Then
isDesignHidden = False
Else
isDesignHidden = True
End If

Exit Function
err_handler:

Messagebox "Upps! There was an error." & Chr$(10) & Chr$(10) & _
"Procedure: " & Getthreadinfo(1) & Chr$(10) & _
"Error nr.: " & Cstr(Err) & " / Line: " & Cstr(Erl) & Chr$(10) & _
Error, 16, "Error"

Resume err_resume

err_resume:
End
End Function

Instead of parsing the DXL we just search the string for "<form". This is much faster. wink.gif

Technical article IBM Notes IBM Notes Traveler Development

You have questions about this article? Contact us: blog@assono.de

Sie wollen eine individuelle Beratung oder einen Workshop? Read more

More interesting entries

Any questions? Contact us.

If you want to know more about our offers, you can contact us at any time. There are several ways to contact us for a non-binding first consultation.

We don’t sell your data. 100% guaranteed. See: Privacy Policy
assono GmbH

Location Kiel (headquarters)
assono GmbH
Lise-Meitner-Straße 1–7
24223 Schwentinental

Location Hamburg
assono GmbH
Bornkampsweg 58
22761 Hamburg

Phone numbers:
Human resources department: +49 4307 900 407
Marketing department: +49 4307 900 402

E-Mail adresses:
contact@assono.de
bewerbung@assono.de