Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Parent and response documents...

Posted on 2002-05-01
8
Medium Priority
?
1,321 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 1200 total points
ID: 6983810
0
Technology Partners: 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

Technology Partners: 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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

971 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