View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default AS400 transfer via VBA

Sounds like you don't have the OLEDB Data provider for AS400 installed.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
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