Solved

Parent and response documents...

Posted on 2002-05-01
8
1,231 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

21 Experts available now in Live!

Get 1:1 Help Now