Skip to main content

Wow, Didn't See this Coming

Over the past couple of days I have been trying to trace a bug in my code without any resolution, until today. Wasted days of precious time. I trace down the issue and discovered it was the result of another odd behavior of Lotus Notes. I do not know if this applies to other versions of Lotus Notes, but I can guess it does. In the Lotuscript database class, NotesDatabase, the property Notesdatabase.Server is used often. It should return the server name in the following format:

CN=Acme01/O=Acme

This is fine, but if you get the same property in a dialog box, you WILL NOT get the same format. Instead the format is:

Acme01/Acme

So when I was parsing the server name I would get different results causing a chain of errors that resulted in hours of time tracing the error in code that has been working for years. What a pain. As we push Notes and Domino more and more into a new level, we are finding more and more things to watch out for.

Comments

Very strange, never had a problem with this. But a tip: don't parse, use NotesName:

Dim servername As NotesName
Dim currentserver As String

Set servername=New NotesName(db.server)
currentserver=servername.Common

Hope this helps.
Anonymous said…
"parsing"...

Seems like you handle the server name like a string. Why not create a Notesname instead and handle the server name in proper way?

Brgds Jesper Kiaer

http://www.nevermind.dk
Anonymous said…
"parsing"...

Seems like you handle the server name like a string. Why not create a Notesname instead and handle the server name in proper way?

Brgds Jesper Kiaer

http://www.nevermind.dk
Theo and Jesper,

Thanks. For some reason that never cross my mind. That works.

Popular posts from this blog

Creating Twitter Bootstrap Widgets - Part II - Let's Assemble

Creating Twitter Bootstrap Widgets - Part I - Anatomy of a Widget Creating Twitter Bootstrap Widgets - Part II - Let's Assemble Creating Twitter Bootstrap Widgets - Part IIIA - Using Dojo To Bring It Together This is two part of my five part series "Creating Twitter Bootstrap Widgets".   As I mentioned in part one of this series, Twitter Bootstrap widgets are built from a collection standard HTML elements, styled, and programmed to function as a single unit. The goal of this series is to teach you how to create a Bootstrap widget that utilizes the Bootstrap CSS and Dojo. The use of Dojo with Bootstrap is very limited with the exception of Kevin Armstrong who did an incredible job with his Dojo Bootstrap, http://dojobootstrap.com. Our example is a combo box that we are building to replace the standard Bootstrap combo box. In part one, we built a widget that looks like a combo box but did not have a drop down menu associated with it to allow the user to make a select...

The iPhora Journey - Part 8 - Flow-based Programming

After my last post in this series -- way back in September 2022, several things happened that prevented any further installments. First came CollabSphere 2022 and then CollabSphere 2023, and organizing international conferences can easily consume all of one's spare time. Throughout this same time period, our product development efforts continued at full speed and are just now coming to fruition, which means it is finally time to continue our blog series. So let's get started... As developers, most of us create applications through the conscious act of programming, either procedural, as many of us old-timers grew up with, or object-oriented, which we grudgingly had to admit was better. This is true whether we are using Java, LotusScript, C++ or Rust on Domino. (By the way, does anyone remember Pascal? When I was in school, I remember being told it was the language of the future, but for some reason it didn't seem to survive past the MTV era).  But in the last decade, there a...

MWLUG 2015 Session Abstract Submission is Now Open and New MWLUG 2015 Web site

I am please to announce that session abstract submission is now opened for MWLUG 2015.  Abstract submission will close on May 22, 2015 so get your abstracts in.  To submit your abstract go to: http://mwlug.com/mwlug/mwlug2015.nsf/Abstract.xsp This year's theme is "Transforming Collaboration Through Innovation".  So if you have done unique ways of incorporating or using others technologies with the IBM portfolio, different ways of utilizing the IBM portfolio in your business, or taking IBM technology and make it do things that it was not designed to do, we want to hear from you as an innovator. So don't be shy and submit your abstract. MWLUG 2015 session tracks include: Application Development Best Practices in Social Collaboration Customer Business Cases Innovation System Administration As always, if you have never spoken at a conference, here is your opportunity to contribute to our community.  We reserve a number of slots for new speakers.  ...