View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] steven.britton@meridian-yachts.com[_2_] is offline
external usenet poster
 
Posts: 1
Default AS400 transfer via VBA

When I do the below I get the message Provider cannot be found? What
am I not seeing here? I am trying to remove the use of the report
downloader Evergreen in certain applications.

Public Sub Open_AS400()
Dim rst As ADODB.Recordset
Dim strSQL As String

strSQL = "Select * from mylib.myfile"

Set rst = New ADODB.Recordset

' xxx = my IP of the server containing the files
rst.Open strSQL, "Provider=IBMDA400;Data Source=xxx.xxx.xxx.xxx;"

Range("A2").CopyFromRecordset rst

End Sub