Dim Stm As ADODB.Stream
Dim Rec as New ADODB.Record
Dim Conn as New ADODB.Connection
Dim Stm2 as New ADODB.Stream
Dim Url As String
Url = "http://server/public/dataitem.txt"
Conn.Provider = "ExOLEDB.DataSource"
Conn.Open Url
Rec.Open Url, Conn
Set Stm = Rec.Fields(adDefaultStream).Value
' Or, alternately
Stm2.Open Rec, adModeRead, adOpenStreamFromRecord
'...
Conn.Close
Rec.Close
Stm.Close
Stm2.Close
Set Conn = Nothing
Set Rec = Nothing
Set Stm = Nothing
Set Stm2 = Nothing
|