NotesSQL to the Rescue
I was new to PDAs and had very little time to devote to the project. Also I was stuck in a hotel in San Francisco, desperately needing the information in a truly portable format. What was worse, the name and address database was in Lotus Domino/Notes, and it wasn't in the standard Name and Address Book (NAB) format.
My first, knee-jerk reaction was to consider writing some code, but I honestly didn't have a moment to spare to debug agents or write LotusScript. Also, the format I needed to convert the data to was a comma-separated values (CSV) format so that the standard Palm PDA synchronization software could transform it. The thought of squinting at field variables through the lenses of commas and quotations marks was not pleasant. What I needed were some quick tools to help me make the leap from Notes .nsf files to a file that a PDA could consume.
Then I remembered NotesSQL. NotesSQL is an ODBC driver that Lotus offers free if you are intrepid enough to ferret it out of the Lotus domain. It allows ODBC-enabled data reporting tools, database tools, and application development tools to read, report, and update information that is stored in Domino/Notes .nsf databases.
Why You Need a Special ODBC Driver for Domino/Notes Databases
For those of us who were raised on relational databases such as DB2 or Access, the Notes/Domino database is a real conundrum. Why? Because information within it is in a "document" structure, so there's no telling what field elements are contained within. That's why most database administrators and programmers grit their teeth when they're asked to pull or push information between relational and document database formats.
However, the NotesSQL driver allows you to query a Domino/Notes database using Microsoft's Query interface and then pull or push information quite easily into MS Access or MS Excel data elements. That's what makes using NotesSQL so much more attractive than programming: It's quick and easy, and everything can be done with point-and-click.
The Task of Finding NotesSQL
However, finding NotesSQL is a bit daunting all in its own. IBM/Lotus doesn't really think of NotesSQL as an ODBC driver; they seem to want us to believe it's a full-blown application, so they tend to hide it on their Web sites. Also, they're currently running you through a real gamut of registration and security in order to get to this driver. Lucky me! I had just enough time in my hotel room to squirrel around, find the site, and download the package. It wasn't where I expected to find it, but I was able to find the NotesSQL driver by doing a software search at IBM's Web site: http://www14.software.ibm.com/webapp/download/search.jsp?q=NotesSQL&cat=groupware&S_TACT=&S_CMP=&go=y . Of course, by the time you're looking for it, IBM may have moved it somewhere else.
Setting Up Your ODBC Data Source to NotesSQL
As of this writing, the latest version is 3.01, and it works with Domino 4 and 5 .nsf databases. I'm not certain if it will work with the new Domino/Notes R6 that is currently out in beta.
The NotesSQL package comes in a zip file that self-extracts into a folder off your hard drive. Once you run the installation process, it will throw you directly into the ODBC registration process.
To add the driver to your ODBC sources, click the ADD button to see the window below.
Select the NotesSQL Driver, and click Finish.
Next, it will ask you to configure the data source, as shown below.
Selecting Your Notes/Domino Database
Name the data source and give it a description. I gave it a name of "Act4Notes" and identified the server as "local" and the database as "MCConCos.nsf."
If you click on Options, you can further identify the data source to include a User ID file so that you won't have to sign on each time you access the data source. Note: This may be a security issue with your shop. However, in my environment, it was not a problem.
Once you click OK and drop out of the data sources program, you're ready to pull data from the Domino/Notes file using Access, Excel, or some other ODBC-compatible service.
Grabbing Notes/Domino Data into Excel
In my situation, I merely wanted to port data into some application that could create a CSV file. For that reason I chose to use Excel. This is how I did it using the NotesSQL driver.
Within Excel, I clicked Data/ImportExternal Data/New Database Query. That opened the ODBC data sources window below.
Next, I chose the Act4Notes* data source that I had described earlier and clicked OK. The NotesSQL driver automatically connected me into the Notes .nsf file that I had identified in the ODBC data source description. It then presented me with a list of all the Domino views and forms that were available to me for querying. In this case, the views and forms for this .nsf file looked like this:
You can select one or more of these forms or view descriptions, or you can expand each form or view to select the individual fields that you might need. In my case, I only wanted the fields from the Contact form shown below. These fields were to become the columns in my query.
Clicking Next> allowed me to filter the data by field and to sort it in a manner that made sense, following the standard MS Query functions. The last screen of the MS Query process allows you to choose to return the data to Excel, view the query through the MS Query viewer, or--if you're running XP--create an OLAP cube from the query.
Because I ultimately wanted to put the data into a Palm PDA, I chose to return the data to Excel. I also saved the query under a name I would want to use later.
Note: If you try to extract too many fields using MS Query, clicking the Finish button will do nothing. There is no "Too many fields" message sent to you; you just don't go any further. If that's what's happening to you, click the
Creating a CSV File
My Domino/Notes data was then extracted by the query into rows and columns and returned to the Excel spreadsheet. I then chose to save it as a CSV file because I needed to send it to a Palm PDA. So I clicked File/Save As, and set the Save as Type field to CSV (comma delimited). If you just want to get the data into an Excel spreadsheet, you can just save it as a normal XLS file.
Putting the Data into the Palm PDA
The final step to getting the data into the Palm PDA required me to use the Palm OS Desktop application that came with the PDA. Under normal use, this application enables you to synchronize your desktop files with the PDA, using a cable that stretches between your PDA and your desktop computer. It also allows you, however, to "link" an external file into one of your Palm PDA applications. In my case, I wanted to link the new CSV file that I'd just extracted from the Notes/Domino database into my PDA address book.
Within the Palm Desktop software, I clicked Hot Sync/File Link and was presented with a selection screen that looked like this:
I selected Create a new link and clicked Next>. I was then prompted to choose the application into which I would link the new data, the file name of the CSV file that contained the data, and the Category into which the new data would be slotted. This screen is shown below.
Clicking the Next> button sent me to a window that allowed me to "map" each field within the PDA application to each field that was in the file that I had saved as a CSV file. By moving the fields up and down within the two windows, I was able to map fairly closely the fields that I would need in my PDA.
I could also test the map by scanning records within the CSV file to see if they matched the appropriate application fields for the PDA. When done, I clicked OK. I was then provided with an option to set the update frequency. In my case, I only wanted to populate the PDA once.
Synchronizing the Notes/Domino Data to the PDA
The final step to getting the data into the PDA was now very simple. I merely set the PDA into the sync cradle that came with it, connected to the serial port of the PC, and pressed the Hot Sync button. The PDA automatically grabbed the data off the PC and loaded it into the Address Book application in its memory.
When next I looked in my PDA address book, there were all the records I'd downloaded from the Notes/Domino database, listed under the category that I had chosen. It was great!
Some Caveats
I used this technique to quickly populate my PDA with data off the Notes/Domino database. However, this is not strictly a two-way replication process. If I were to make a change to the data within the PDA, the next synchronization would, in fact, upload those changes into the CSV file. However, those changes would not be further reflected in the Lotus Notes/Domino database itself. Why? Because I chose Excel as my medium for extraction! The MS Query that I used could only "extract" and "import" data into Excel. Excel does not allow you to export through the NotesSQL ODBC driver. Consequently, it's not an adequate mechanism to upload data into the .nsf database. To do that, you would need to create a real program to use the NotesSQL ODBC driver. Or, if you're familiar with MS Access, you could use the NotesSQL driver to populate an Access database instead of an Excel spreadsheet.
Quick, Easy, Cheap--A One-Shot Solution
In my case, populating the PDA gave me a quick snapshot of the Notes/Domino database, allowing me to portably use the data during the conference. It was a perfect solution. I was able to get the data quickly, step-by-step, and put it into the PDA without a hitch, and it didn't cost me a nickel. The entire transformation--from the time I downloaded the NotesSQL driver until the time I had the 2000 record database in my PDA--took less than an hour and a half to configure in my hotel room. Goodness knows how long an effort it might have been had I attempted "brute-force programming" with LotusScript, VB, or Java.
As it was, I got the data just in time to run downstairs to the hotel bar to tip elbows with all those business contacts whose names I might have forgotten without my new PDA.
Hey! Thanks IBM and Lotus! Next time, how about a free eServer giveaway?
Thomas M. Stockwell is Editor in Chief of MCMagOnline. He can be reached at
LATEST COMMENTS
MC Press Online