When accessing a database that's either encrypted or corrupted, the Notes Database object is not usable and there is no specific information.
Dim db As New NotesDatabase( "Server/Domain", "database.nsf" )
If db.IsOpen Then
MsgBox ( "Succesfully opened " & db.Title )
MsgBox ( "Unable to open database" )
The LotusScript should provide specific information when this scenario occurs e.g. the database is encrypted, the database is corrupted, you do not have access to the database etc.