0
votes

faced new strange problem: I have several databases (cloned - similar with same/different files). But trick in that if I open one database Database script Initialize method is fired, when I try to open another database, database script initialize method doesn't fire. In initialize method I only setting session variables. So not setting variables, makes errors working in database

Found same situation but there no solution provided

http://www-10.lotus.com/ldd/nd6forum.nsf/d202cf70fecca50b852569ff00736545/008ac7ae806ef01d852579dd002a6194?OpenDocument

1
Are the databases in question open in designer when testing? Because then the events will not fire in clientTorsten Link
Yes, I test in designer [running debugger]. So fault is that [I realised] that if designer is open events are not going to fire. You have answered my question. ThanksVelaro
then please accept my answer...Torsten Link

1 Answers

2
votes

QueryOpen and Initialize- events are only fired once, when a database is opened. Notes Client and Designer SHARE an instance of the same database.

As long as a database is open in designer (and it can be tricky to "really" close it without removing it from the working set), the events in the client will never fire, as the database is considered "open".

EDIT: As D.Bugger stated in his comment (Thanx for that) you can close the database in designer by right-clicking it and select Close Application from the context menu.

Same is true for all other database events: Any changes will not be visible, until all instances of the database are closed in Client AND Designer.

And events "QueryClose" and "Terminate" will not run before database is closed everywhere.