Solved

Parent and response documents...

Posted on 2002-05-01
8
1,224 Views
Last Modified: 2013-12-18
Scenario:
I copy a document via back-end to another database.
The response of the coped document is then copied as well and made as response documents to the newly copied document.
This code always worked before, it just now started with the following error:
"Parent and response documents must be in the same database"
I ran through the code with the script debugger and both documents are in the same database and on the same server.
This is the line of code generating the error:
Call NewResponseDoc.MakeResponse( NewParentDoc )

Any ideas?
Regards
Deonva
0
Comment
Question by:deonva
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6983725
The problem is NewResponseDoc exists in different server/database and NewParentDoc exists on different server/database. Correcting that to one source db will eliminate this problem.

PS: NotesDocument.ParentDatabase method will give you the database the document is created or saved.

~Hemanth
0
 

Author Comment

by:deonva
ID: 6983760
Hermantha

The code u used to check:
If NewResponseDoc.ParentDatabase.Server <> NewParentDoc.ParentDatabase.Server Then
  Messagebox("Wrong server")
Else
  Messagebox("Right server")
End If

If NewResponseDoc.ParentDatabase.FilePath <> NewParentDoc.ParentDatabase.FilePath Then
  Messagebox("Wrong FilePath")
Else
  Messagebox("Right FilePath")
End If

Both messageboxes shows correct.

I checked in the scrip debugger as well, the databases are the same...

Any other ideas?
PS. We are running Domino 5.08

0
 
LVL 9

Accepted Solution

by:
Arunkumar earned 300 total points
ID: 6983810
0
 

Author Comment

by:deonva
ID: 6983813
Hermanth

I found the problem.
I create the NewParentDoc in a Sub (Script library)
In this sub I declare the database.
This sub calls another sub passing the NewParentDoc as parameter.
In this sub I declare the database again as the db are not declared as global.  This seemed to cause the problem.
I now tried declaring the db as global and it worked.
I tried passing the db as a parameter ant this worked as well.

It seemed like when you declare the db in diff, subs, the code
"Call NewResponseDoc.MakeResponse( NewParentDoc )"
will give an error....strange.

Thanks anyway

Regards
Deonva
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:deonva
ID: 6983828
Arunkumar

Yup, seemed like when the same database is declared in 2 diff. routines, the MakeResponse method does not work.

Thanks for the feedback, the fault were resolved before I got your answer, but I will allocate the points to you.

Thanks for the feedback.
Regards
Deonva
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6983830
Seems to be a bug:
http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/d5000365f9ed039a8525679a005c9ceb?OpenDocument

My recomandation would be to use separate instance variables for documents when switching trough a document collection.
For example:
 Set doc = dc.GetNextDocument(doc)
does work, but should be:
 Set docB = dc.GetNextDocument(docA)

This is of course only a guess where this problems come from :-)

0
 
LVL 10

Expert Comment

by:zvonko
ID: 6983834
This all is too fast for me :-)

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6983854
uh Oh Zvo!
You were a little bit late on this big one...
:-)
Arun.
PS: Thanks Deonva for the pts.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now