question

xnl28 avatar image
xnl28 asked

How to use OPENROWSET to get data from LotusNotes

I've installed the Lotus NotesSQL 8.5.1 ODBC driver and set up the ODBC system DSN. But I'm having trouble getting the OPENROWSET command to work. Can anyone give some specific examples of using OPENROWSET with the Lotus NotesSQL 8.5.1 ODBC driver?
sql-server-2008-r2odbclotus-notes
5 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

What connection string are you using? and what does the documentation for the ODBC driver suggest you use?
0 Likes 0 ·
I'm using the one given at ConnectionStrings.com Driver={Lotus NotesSQL 3.01 (32-bit) ODBC DRIVER (*.nsf)};Server=myServerAddress; Database=dbPath\myDb.nsf;Uid=myUsername;Pwd=myPassword;
0 Likes 0 ·
Have you tried @Magnus's suggestion, below?
0 Likes 0 ·
Yes, I created a File DSN, and this is the contents of the file is given below. I had no luck trying to build an OPENROWSET statement out of this data, though. Any suggestions? [ODBC] DRIVER=Lotus Notes SQL Driver (*.nsf) ThreadTimeout=60 MapSpecialChars=1 ShowImplicitFlds=0 MaxLongVarcharLen=512 KeepTempIdx=1 MaxVarcharLen=254 MaxRels=20 MaxStmtLen=4096 MaxSubquery=20 EncryptPWD= UserName= Server=LTN1/REG Database=lndb.nsf
0 Likes 0 ·
From that, I would try: Driver={Lotus Notes SQL Driver (*.nsf)}; Server=LTN1/REG; Database=lndb.nsf; UserName=; Pwd=; (replacing the bits in <<>>s as appropriate) as your connection string.
0 Likes 0 ·
Fatherjack avatar image
Fatherjack answered
Does the answer to this question give you what you need http://ask.sqlservercentral.com/questions/32765/import-lotus-notes-database
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I've looked at that, it's a really useful article. But ConnectionStrings.com doesn't have a string to for version 8.5.1 of the NotesSQL driver; and when I follow the steps to create a linked server, I get the "OLD DB provider for linked server LN reported an error. Cannot initialize the data source object of OLE DB provider MSDASQL for linked server LN (Error: 7399)" Not sure what to try next.
0 Likes 0 ·
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
I can't give you the syntax of a Connection String for NotesSQL 8.5.1 since I don't have it installed. But if I did have it installed, I'd create a File DSN in **Administrative Tools->Data Sources(ODBC)** with a connection to your Notes DB and then have a look at that file for hints on how to create the OPENROWSET command.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.