set dsn="<yourODBCSource>"
set conn=##class(%SQLGatewayConnection).%New()
set sc=conn.Connect(dsn,"","",0)
set res=##class(%ResultSet).%New("%DynamicQueryGW:SQLGW")
set sc=res.Prepare("SELECT * FROM yourAccessTable",,conn)
set sc=res.Execute()
while res.Next() {
write !;res.Get("yourColumn")
}
You may configure an ODBC Data Source to your MSAccess "file" and use the %SQLGatewayConnection class.
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls... When I had to use it around 2012 was looking like this: