3
votes

Is there anyway to unlock Lotus Notes database design without using paid software ?

Person who lock the db left the company and we don't have any template for this app.So only way to start further development on this database by unlocking this db.

1
There are 3 states of a Notes Database file. 1: Notes Database with opened design. All scripts and formulas are accessible. 2: closed design, when there is no way to access the design of the database. All scripts and formulas are stored as compiled binaries and all source codes are stripped from the database body. 3: Half-open design. It is like the 2nd state, but there is an unlocked flag in the database header, that allows to open this db in designer. But all source code sections will be empty. Unlocking database won't help you to access the source code. - user784540

1 Answers

4
votes

Did you already try for example this code which comes up quickly with Google?

Const APIModule = "NNOTES" ' Windows/32 only
Const REPLFLG_HIDDEN_DESIGN = &H0020

Type ReplicaInfo
ID(1) As Long
Flags As Integer
CutoffDays As Integer
CutoffDate(1) As Long
End Type

Declare Function NSFDbOpen Lib APIModule Alias "NSFDbOpen" _
( Byval P As String, H As Long) As Integer
Declare Function NSFDbClose Lib APIModule Alias "NSFDbClose" _
( Byval H As Long) As Integer
Declare Function OSPathNetConstruct Lib APIModule Alias "OSPathNetConstruct" _
( Byval Z As Long, Byval S As String, Byval F As String, Byval P As String) As Integer
Declare Function NSFDbReplicaInfoGet Lib APIModule Alias "NSFDbReplicaInfoGet" _
( Byval H As Long, R As ReplicaInfo) As Integer
Declare Function NSFDbReplicaInfoSet Lib APIModule Alias "NSFDbReplicaInfoSet" _
( Byval H As Long, R As ReplicaInfo) As Integer

Sub HideDesign(db As NotesDatabase, hide As Variant)
Dim hDB As Long
p$ = Space(256)
OSPathNetConstruct 0, db.Server, db.FilePath, p$
NSFDbOpen p$, hDB

Dim R As ReplicaInfo
NSFDbReplicaInfoGet hDB, R
If hide Then
R.Flags = R.Flags Or REPLFLG_HIDDEN_DESIGN
Else
R.Flags = R.Flags And Not REPLFLG_HIDDEN_DESIGN
End If
NSFDbReplicaInfoSet hDB, R

NSFDbClose hDB
End Sub