Solved

Accessing ODBC via an Agent

Posted on 2004-03-22
4
406 Views
Last Modified: 2013-12-18
Hi Guys

Can Notes initiate an Agent the will open a ODBC coonction to Access under certain circumsatances and exchange data

I have a link,Using File-Get External Data-Link  in Access

0
Comment
Question by:adspmo
[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
4 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 10652331
Here is a preliminary code

Put this in ur options:

Uselsx "*LSXODBC"




Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
' Connect to the datasource
If Not con.ConnectTo("OurODBCSource") Then ' here give your odbc name
Messagebox "Could not connect ",, "Error connecting"
Exit Sub
End If
' Set up the odbc objects
Set qry.Connection = con
Set result.Query = qry

qry.SQL = "SELECT * FROM <your tablename>"


' and execute the query - and wait for the result set to fill up with data
result.Execute

' Now roll through each row of the result set and create a new document in our database for each row in the table
If result.IsResultSetAvailable Then
Do
result.NextRow

msgbox result.getvalue("name")
Loop Until result.IsEndOfData
result.Close(DB_CLOSE)

End If

' Close the connection to the ODBC Source
con.Disconnect



Partha
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10652354
Yes, Notes can.  Agents can use LCLSX (better but harder) or LS:DO (easier but less flexible). Define a system DSN, then connect to it using either of the above.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10652360
FYI, Partha's *LSXODBC is the same as LS:DO.
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 500 total points
ID: 10655803
Hi adspmo,

Check out this class http://www13.brinkster.com/ranjeetrain/source/gware/clsodbc.asp I wrote it to do something similar. This code is tested ok agains a sybase database.

Yes, on the machine where the code will run, you need a system DSN. That's a requirement.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

729 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