Solved

Accessing ODBC via an Agent

Posted on 2004-03-22
4
405 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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