Manage Learn to apply best practices and optimize your operations.

Notes Access connectivity

The following block of code is used to populate a notes view with values from MS Access.

The following block of code is used to populate a Notes view with values from MS Access.

Before that include this in the options section

Uselsx "*LSXODBC"

Dim session As   notessession
Dim database As notesdatabase
Dim view As notesview
Dim doc As notesdocument
  Set view=database.getview("viewname")
	Dim connection As ODBCConnection
	Dim query As ODBCQuery
	Dim result As ODBCResultSet
	Set session = New notessession
	Set database = session.currentdatabase	
	Set doc = session.documentcontext
	Set connection = New ODBCConnection
	Set query = New ODBCQuery
	Set result = New ODBCResultSet
	Set query.Connection = connection
	Set result.Query = query
	Call 	connection.ConnectTo("DSNname","","")
	i% = 0
	temp$ = "Select * from  table1"
	query.SQL = temp$
	If Not result.Execute Then
		Print result.GetExtendedErrorMessage,, result.GetErrorMessage	
			Set doc = database.createdocument
			doc.form = ' Form Name
			doc.fldname = result.GetValue(2)
			doc.fldname= result.GetValue(3)			
		Loop Until result.IsEndOfData
	end if
This was last published in April 2002

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...