Subscribe via Feed
, May 27, 2010 11:31:51 AM
9 responses to Binding XPages to External Databases - Watchout!
John Jaeckle, April 14, 2011 12:38 AM
If i am understanding this correctly, This bug sitll exists in the Notes Client in 8.52, but not in a browser. My solution was to not use the built in "Open XPage option) but rather create a custom URL for the column I wanted the link in and open an xpage with that URL and then pass the target UNID to that xpage.
(http:/thisserver/thisdb/yourXpage.xsd?open&documentID=xxxx). However in the Notes client, this forces the user to have to login. Are we talking about the same issue? Any ideas on how to get rid of the login? I've tried using "notes://" as opposes to "http://" but no joy.
David Leedy, November 11, 2010 8:57 PM
Thanks for adding the snippet. I've not tried this on 8.5.2 yet so there might be differences. One thing I should point out which might not have been clear in the post is that my original solution:
Was used in the binding of the view at the datasource level. So no array was needed. You're right though and it's my understanding that @DbLookup does want an array passed in.
thanks for sharing the code!
John C, November 11, 2010 7:20 PM
After messing around on 8.5.2 I user the following:
db = Array(@Subset(@DbName(),1), "dbname.nsf"));
@DbLookup(db, 'View', 'Value', 2)
The code did not seem to work until I used it as an ARRAY. The it would work on all THREE:
Client, Web AND LocalHost
David Leedy, July 23, 2010 5:15 PM
And have you tried sess.getDatabase(srvr, extdb) on XPages In the Notes Client? That's where I had the problem. The server worked just fine but when I tried to run the app on local database in Notes Client - no luck. Actually I had one database that did work but not the one I wanted. I could not get 5-6 other tested databases to work. All the ACL's were the same. It was very weird.
But the older style code: @Name("[CN]",@Subset(@DbName(),1))+"!!dbname.nsf" worked in both.
markb, July 22, 2010 8:29 PM
sess.getDatabase(srvr,extdb) works for me on 8.5.1 except when there is an access problem, i.e. if the user running the XPage does't have access to extdb. The runtime error gives no clue that it is just an access issue but if you get something like this check the users access before you start hacking your script to bits.
Script interpreter error, line=11, col=34: Exception occurred calling method NotesSession.getDatabase(string, string) null
Atul Saxena, June 1, 2010 12:30 PM
I used the following formula, to pull user's from Name & Address book (But you need to install FP2 on server)
db = new Array(@Subset(@DbName(),1),"names.nsf");
Lars Berntrop-Bos, May 27, 2010 11:28 PM
The syntax look familiar because this is what you need to use for referencinf other db's on a server in Outlines.
It's also used in other places.
Steve Castledine, May 27, 2010 1:14 PM
Theres an associated Designer fix for this as well for 8.5.2, when selecting the server for an alternate database. The problem was you "had" to select a server whereas in most cases it was on the same server as the starting nsf. This then leads to hardcoded server names being used, which is not great :)
Usual caveats with future stuff.
Paul Hannan, May 27, 2010 12:50 PM
This is an 851 bug (PHAN82DK5F) which has been fixed in 852. The workaround above will work but it can be a real pain if you got to hard code references to external apps all over the place. The fix in 852 should resolve this.
Why does it happen? It's down to the runtime, all two of them - the Domino server has one and XPages in the client (XPiNC) has another (both are the same unless they are different versions). On XPiNC the runtime is local and so the 'server' is local and the app will attempt look up another app on the 'local' server which just isn't there. This is the failure. Now all we have to do then is get the correct server name rather than the local - hence the above workaround.
Real sorry for the cause of your sleepless night.