I started getting the following error when trying to run some code which had been fine previously:
‘A database handle to a remote database cannot be used by more than one thread’
The code I was running was in an agent which called a script library which was doing things with ODBC, so I assumed it must be something to do with trying to have multiple connections to the database open at one time.
Quite a long time later and after much searching, I discovered it was actually NOT to do with this at all. It turns out that where my agent was set to run in a Background Client Thread, i’d failed to take out some code which called ws.DialogBox and it was just that the condition to pop up the dialog hadn’t been met before during my testing.
When the code didn’t try to open a DialogBox, the error didn’t occur, so if you start getting this error, search your code for anything running off a NotesUIWorkspace object.
I hope this helps someone find the solution to their problem a bit quicker than I did!
Emily.