Click to See Complete Forum and Search --> : Question on VB, Lotus notes


cm3
July 18th, 2001, 02:23 PM
Hi All,

I am working on vB,Lotus notes.Here is the code i used to get the connection,get view information.

Private Sub cmdNewok_Click()

Dim session As Object
Dim db As Object
Dim view As Object

Set session = CreateObject("notes.notessession")
Set db = session.GETDATABASE("US-FAIRAPP001/Eastern/C&L/US", "MCS\WCP\contracts\contract.nsf")

flag = True

If Not (db.ISOPEN) Then flag = db.Open("", "")

If Not flag Then
MsgBox "Cant't open file: " & db.SERVER & " " & db.FILEPATH
End If

Set view = db.GETVIEW("Central Audit DB Lookup)")

'Here i need to map the view documents data into MS-Access table.I crated same like view table fields in Access table.The main purpose of the code is to get the Lotus notes view data into Access table.

Set view = Nothing
Set db = Nothing
Set session = Nothing

TH1
July 19th, 2001, 02:48 AM
I don't know if this will help you but I posted this last year when someone else was asking about lotus notes
http://www.codeguru.com/cgi-bin/bbs/wt/showpost.pl?Board=vb&Number=18659&Search=true&Forum=vb&Words=lotus&Match=Whole&Topic=&Searchpage=0&Limit=25

cm3
July 19th, 2001, 08:09 AM
I looked at the sample project.This is not the right answer i am looking for.

neal wilkinson
July 25th, 2001, 11:37 AM
It depends on the version of Notes you are using now, as there are some new methods of collection data from views.

Depending on how many documents are in the view, one of thebest methods would be to collect the documents in the view into a document collection, then loop through each one gathering the information you need and dumping it directly into your access DB.

The export function for notes is designed for the UI and not the backend class, and can be a pain to use. Also, you need to bear in mind that the view export will only export what you can see, so if any columns are truncated, your data will also be truncated