This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 10, 2011, 10:46 AM
5 Posts
topic has been resolvedResolved

Trouble with DbLookup / DbColumn on another server

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.1
  • Role: Developer
  • Tags:
  • Replies: 2
Hi,
 
 I'm trying to get values from a view via DbColumn and DbLookup. The target database resides on a different server than the XPage.
 
If I open the XPage with my user everything works fine. But if I open the XPage with a testuser DbColumn doesn't return a value. The test user can open the database and the view.

Code Example :
 
db = new Array('server','path\\db.nsf'); 
var keys = @Unique(@DbColumn(db,'view', 1));
if (!keys)
{
return 'no result';
}
else
{
return keys;
}
 
First I thought it must be an error with the view and I tested to get back a property from the database (via .getTitle()). This doesn't work either for the test user.

I think it has something to do with missing rights but I don't have an idea where there could be something wrong.
 
Any hints ?
 
With kind regards
Ingo Spichal
 
 
Edit : Changing the backslahes to slashes in the path doesn't have any effect.

 
Edit 2 : If I copy the XPage to the target database, DbColum and DbLookup are working for all tested users. So this should be a problem with accessing a different server and some kind of rights missing.
Mar 10, 2011, 4:16 PM
41 Posts
Re: Trouble with DbLookup / DbColumn on another server
Verify that the target server of the DbLookup lists the host server for the XPage as a "trusted server" in the Security section of the server document... I am assuming it needs to be listed in order for the cross-server queries to be permitted.
Mar 11, 2011, 7:30 AM
5 Posts
Re: Trouble with DbLookup / DbColumn on another server
Thank you. That was the problem.
 
After correcting the list of trusted servers the XPage works for all users.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal