Close() method does not work on Post Open event of database script if default launch Frameset contains more than 1 level of hierarchy for Named element mentioned inside launch Frameset.
For example : default launch frameset (e.g. FramesetA) contains another Named element "frameset" (e.g. FramesetB) and second Frameset (FramesetB) contains Named element "View".
In this situation if we call notesUIDatabase.Close() on post open event of database script then it will not work, however if we remove the FramesetB from the situation and directly assigns "view" in "framesetA" then Close() method works properly.