Solved

Parent and response documents...

Posted on 2002-05-01
8
1,246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus Notes 41 223
lotus domino server console error 1 86
Why the url within notes is no action 6 57
Get files more than 50 GB from F drive on list of servers 8 103
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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