Subject: RE: document is from a different database
It sounds like you’ve taken offense at my suggestion that you would get better answers by providing more complete information in your question.
I’m sorry that upset you – I’m not saying you must or should do it this way – it’s just a suggestion, and it’s the way that works better for me and for some other people who answer questions here (so they have said).
I’m not saying I refuse to try to answer your questions without you do it my way. But we are not psychics. As a practical consideration, GIGO.
Often I am conscious that I could help more if the questioner provided more facts, and this is frustrating for me because I want to help. I would like to be able to give the right information to let you solve your problem, and I don’t want to have a long back-and-forth to do it because I have limited time and could be helping three other people in that time who have made it easier for me (or, for that matter, doing the work IBM pays me for!).
So, I could ask question after question trying to narrow down what’s wrong, and sometimes I’ll do that. But often I don’t have time for it. Would you prefer that I just not try to answer your questions unless I do have time for the quiz approach, or are you more comfortable now with the idea of my just requesting crispiness? I can do it either way (however, remembering everyone’s preference is hard).
… that there was a specially designated person to teach you how to do it.
I am self-appointed. So far, nobody seems to be paying much attention, so you are in good company.
Do you get to wear a uniform?
No, but I do have a little plastic badge with a star on it.
As I stated, the problem is intermittent and therefore the luxury of being in front of my users machine with the debugger running at the time they experience the problem is [not]. Perhaps the next time I should wave my magic wand…!?
If you have a magic wand, by all means give it a try. I’ve been looking for one for ages, but they cost a fortune.
Alternatively, have a look at the two-part article about debugging, which I posted links to. It gives suggestions about how to deal with exactly that situation. You can make your application capture additional information when there’s an error, to tell more about what happened. (Incidentally, openntf.org also has a very popular and useful error logging tool, free!).
Now that I have told you what causes that particular error message, chances are you can inspect the code and identify the line the error occurred on, and either figure out how you might be getting a document from a different database than the collection, or perhaps put in an error trap which, when the error occurs, will display the values of some variables for the user to report back to you.
My best guess, at this point, is that you have two NotesDatabase objects that are supposed to both be the current database, but one of them was located in some way other than session.CurrentDatabase – perhaps by use of the OpenMail method – so that you are working with two different replicas. Again, if you showed some source code I could make a more informed guess.
btw:Is this CRISPY enough for you!?
You have actually added no information, so no, it’s no CRISPIER now. (Sorry, you did ask.)