By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,659 Members | 940 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,659 IT Pros & Developers. It's quick & easy.

Lotus Notes SQL ODBC interface from Access

P: n/a
I am trying to access data in a Lotus Notes database, from Access.
The Notes database is release R5.
I installed NotesSQL 8.x and have it working. However it chokes on
one of the tables and references problems with the dates.
If I create a query, without these dozen or so dates, I can access all
the data.

However I am guessing that most of the dates are correct and only some
are bad.

Anyone encounter this before and hopefully have a solution?

bob
Oct 16 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Greetings,

I would go with the Lotus Script instead of the ODBC driver. Here is
some sample code - this will use Lotus Script which you can add DAO code
to read the data from the Lotus Script - make a reference to the Notes
Library in Tools/References - also - you can use early binding with R5
dim sess as New Notes.Session - way better than late binding):

Dim session As Object 'notes session
Dim db As Object 'notes database
Dim view As Object 'notes view
Dim searchview As Object 'notes search results
Dim doc As Object 'notes document
Dim DocCount As Long
Dim ViewStr As String
Dim testvar As string
ViewStr = "3. R&D\By Period"

Set session = CreateObject("Notes.NotesSession")
Set db = session.GETDATABASE("SERVERNAME",
"C:\someDir\yourNotesNsf.nsf")
Set view = db.GetView("View1")
Set doc = view.getfirstdocument
testvar = doc.getitemvalue("fld1")

then you can loop using the GetNextDocument object

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Oct 16 '08 #2

P: n/a
Rich P wrote:
Greetings,

I would go with the Lotus Script instead of the ODBC driver. Here is
some sample code - this will use Lotus Script which you can add DAO code
to read the data from the Lotus Script - make a reference to the Notes
Library in Tools/References - also - you can use early binding with R5
dim sess as New Notes.Session - way better than late binding):

Dim session As Object 'notes session
Dim db As Object 'notes database
Dim view As Object 'notes view
Dim searchview As Object 'notes search results
Dim doc As Object 'notes document
Dim DocCount As Long
Dim ViewStr As String
Dim testvar As string
ViewStr = "3. R&D\By Period"

Set session = CreateObject("Notes.NotesSession")
Set db = session.GETDATABASE("SERVERNAME",
"C:\someDir\yourNotesNsf.nsf")
Set view = db.GetView("View1")
Set doc = view.getfirstdocument
testvar = doc.getitemvalue("fld1")

then you can loop using the GetNextDocument object

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Thanks very much. I will give it a shot.

bob
Oct 16 '08 #3

P: n/a
On Oct 16, 6:53*pm, Bob Alston <bobalst...@yahoo.comwrote:
Rich P wrote:
Greetings,
I would go with the Lotus Script instead of the ODBC driver. *Here is
some sample code - this will use Lotus Script which you can add DAO code
to read the data from the Lotus Script - make a reference to the Notes
Library in Tools/References - also - you can use early binding with R5
dim sess as New Notes.Session - way better than late binding):
Dim session As Object * 'notes session
Dim db As Object * * * *'notes database
Dim view As Object * * *'notes view
Dim searchview As Object 'notes search results
Dim doc As Object * * * 'notes document
Dim DocCount As Long
Dim ViewStr As String
Dim testvar As string
ViewStr = "3. R&D\By Period"
Set session = CreateObject("Notes.NotesSession")
Set db = session.GETDATABASE("SERVERNAME",
"C:\someDir\yourNotesNsf.nsf")
Set view = db.GetView("View1")
Set doc = view.getfirstdocument
testvar = doc.getitemvalue("fld1")
then you can loop using the GetNextDocument object
Rich
*** Sent via Developersdexhttp://www.developersdex.com***

Thanks very much. *I will give it a shot.

bob- Hide quoted text -

- Show quoted text -
One question: I do not know where the nsf database is physically. To
use this approach it looks like I need to know the file address of the
nsf - correct?
I have the Notes client and can access the database. Any easy to
identify the database file name (without having to go to the system
administrator?)?

thanks
Oct 17 '08 #4

P: n/a
Straight from memory here (haven't worked with Lotus Notes going on 4
years now) You can right click on a database icon in the Notes client
window - go to properties and somewhere there it should show the path to
the .nsf file. Here is a caveat - if you don't have the proper rights
to that .nsf I don't think you will be able to see the path or
read/write data - maybe read. I forget Notes security -they have
readers/read-write/administrator/and a few other levels. once you have
the path you should be able to read programmatically.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Oct 17 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.