Error: Specified database is not currently open

Hi,

Can somebody help me please.

I have a document in a library containig attachments.

When I create in the background a new document, having a body field and want to append the attachments in the rt item on the library onto the body field on the new created document with the .AppendRTItem I have some strange behaviour.

The new document is saved in the background, and opened in ui with a ws.EditDocument, when I try to save it it gives me the error.

When I close the document (without saving) and reopen it, it works fine.

Can somebody give me a hint pleeeeeeease.

Thanks in advance

Robert

Subject: Error: Specified database is not currently open

Hi Rob,

You said “The new document is saved in the background, and opened in ui with a ws.EditDocument, when I try to save it it gives me the error.”

Are you using the handle to the (new) document you created in the back-end to open it in the UI? If so, then try getting a new handle to the document you just created/saved and then use that to open the document in the UI (get the new handle from scratch, don’t just to MyNewDocumentHandle = MyOldDocumentHandle) - Rich Text Items are a real pain, because they do not ‘exist’ on the Notes Document object until it is saved.

Hth.

Subject: RE: Error: Specified database is not currently open

Hi James,

Thanks for your fast response.

The problem is not when I open the new created document in the background, but, when this document is opened and I have made some changes on the UI doc, and try to sav the document, it gives me the error.

But if I remove the attachment from the UI document which was created in the background, in UI mode, it works. The strange part is that if I close the UI document (without saving) and reopen the same document, everything works fine.

Maybe a small explanation of the applic.

I have a mail shot, a predefined document in a database where I added tags.

When user creates a communication document, a new document will be created by copying the mail shot, the new document is dumped into DXL, to change the tags with customer info, reîmported in notes as a new document. Than created PDF documents are added in the background including a signature. After doing all this stuff, the document is saved and opened in edit mode.

Now the user makes changes and if he/she saves the document I am getting the error

Best Regards

Robert

Subject: Found a workaround

After 2 days of trial and error I found a work around.Instead of adding directly the RT from the one database into a RT in another, I have created first a temp field.

Than after filling the temp field, I merge both RT fields and remove the temp field afterwards (if not removed, still having problems).