Hi All,
I'm trying to use the following subroutine I found on the internet to connect from an Access (2016 64 bit) database to another web-API enabled Access (2016 64 bit) database to extract some data elements:
Sub DownloadFile0()
Dim Stm As ADODB.Stream
Dim Rec As New ADODB.Record
Dim Conn As New ADODB.Connection
Dim Url As String, Str As String
Url = "http://URL/sosdata.accdb/sdr/doll_per_sdr" ' URL followed by the database, record, and field names
Conn.Provider = "Microsoft.ACE.OLEDB.12.0,DataSource"
Conn.Open Url
Rec.Open Url, Conn
Set Stm = Rec.Fields(adDefaultStream).Value
Str = Stm.ReadText
...
Conn.Close
Rec.Close
Stm.Close
Set Conn = Nothing
Set Rec = Nothing
Set Stm = Nothing
End Sub
When run, I received "Provider not found" and when I bypass "Conn.Provider" statement I received "Data source name too long". Please advise what is wrong in this subroutine. If all are set, will "Str" contain the value of "doll_per_sdr"?