Solved

question on VB & Lotus notes.

Posted on 2001-07-18
3
230 Views
Last Modified: 2007-12-19
Hi all,

I am working on VB, Lotus notes.I used the below code to get the data from LN to MS-Access through VB code.Below is my code.

Private Sub cmdNewok_Click()
 
  Dim session As Object
  Dim db As Object
  Dim view As Object
  Dim viewName As Object
  Dim flag As Boolean
  Dim intEntry As Integer
  Dim viewEntry 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 am getting error,object does not support.
'Here i want to map LN view data to MS-Access table.
   For intEntry = 1 To view.AllEntries.Count
       Set viewEntry = view.AllEntries.GetNthEntry(intEntry)
       MsgBox Join(viewEntry.COLUMNVALUES, ",")
   Next

End Sub

'I hope Timcottee will answer my question.
0
Comment
Question by:bmg3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 250 total points
ID: 6297591
bmg3, I just tried this on my own server with a view and it works fine. What is the exact error message that you are getting? The only thing that looks odd is the extra ) in the view name, should this be "Central Audit DB Lookup" not "Central Audit DB Lookup)" ?
0
 

Author Comment

by:bmg3
ID: 6298236
Hi TimCottee,

The view name is correct.i.e."Central Audit DB Lookup)".The lotus notes developer did type mismatch.Any way i am getting the view name,Lastmodified,CREATED.From here i want to map the fields.I am not getting how view can access record by record and map it to Access fileds.I used the below logic i am getting error like "Object does not supprot this property or method.

  For intEntry = 1 To view.AllEntries.Count
      Set viewEntry = view.AllEntries.GetNthEntry(intEntry)
      MsgBox Join(viewEntry.COLUMNVALUES, ",")
  Next

I hope u understand my problem.

Thanks...

bmg

0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6298505
bmg, I am afraid that I don't completely understand the problem. I wondered whether the view had any twisties or similar in it but testing a view with a twisty doesn't seem to give me any problems. Is there any possibility that you could send me the nsf file so that I can try out it out here and see if there is anything that is unexpected occuring. My address is in my profile, just click on my name and you will get there.

In Terms of saving this stuff to access then it should be pretty easy. You would just need to build an insert statement using:

strSQL = "INSERT INTO MyTable VALUES(" & Join(viewEntry.COLUMNVALUES, ",") & ")"

To directly insert the values from the notes view to access.
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month5 days, 10 hours left to enroll

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question