dbTalk Databases Forums  

Lotus Notes SQL ODBC interface from Access

comp.databases.ms-access comp.databases.ms-access


Discuss Lotus Notes SQL ODBC interface from Access in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob Alston
 
Posts: n/a

Default Lotus Notes SQL ODBC interface from Access - 10-16-2008 , 10:49 AM






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

Reply With Quote
  #2  
Old   
Rich P
 
Posts: n/a

Default Re: Lotus Notes SQL ODBC interface from Access - 10-16-2008 , 06:22 PM






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 ***

Reply With Quote
  #3  
Old   
Bob Alston
 
Posts: n/a

Default Re: Lotus Notes SQL ODBC interface from Access - 10-16-2008 , 06:53 PM



Rich P wrote:
Quote:
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


Reply With Quote
  #4  
Old   
BobA
 
Posts: n/a

Default Re: Lotus Notes SQL ODBC interface from Access - 10-17-2008 , 02:35 PM



On Oct 16, 6:53*pm, Bob Alston <bobalst... (AT) yahoo (DOT) com> wrote:
Quote:
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


Reply With Quote
  #5  
Old   
Rich P
 
Posts: n/a

Default Re: Lotus Notes SQL ODBC interface from Access - 10-17-2008 , 04:16 PM



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 ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.