ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AS400 transfer via VBA (https://www.excelbanter.com/excel-programming/354321-as400-transfer-via-vba.html)

[email protected][_2_]

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


Bob Phillips[_6_]

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





All times are GMT +1. The time now is 08:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com