Solved

Parent and response documents...

Posted on 2002-05-01
8
1,241 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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