Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400 download using VBA

Status
Not open for further replies.

adrianvasile

Technical User
Apr 3, 2006
124
US
I was wondering if anyone has more experience with this. Basically I want to download files from AS400 to Excel or Access using VBA code and not use a DSN file because those excel files will be shared and I do not want to have the DSN installed on each user.
I read about ADO but I wasn't able to get more on it.
Thank you.
 
You might start here:
What you're looking for is an "OLE DB Provider" for AS400. This is Microsoft's; bear in mind that IBM makes one too.

Let me give you a little background that you may find helpful. OLE DB is a group of COM classes that handle data access. If you want to provide data by using OLE DB, you create an OLE DB provider which implements the interfaces defined by OLE DB to do this. If you want to consume data, you also implement interfaces defined by OLE DB for that purpose.

The main OLE DB consumer is ADO, and there are lots of OLE DB providers. The reason you're not going to find much on AS400 by reading about ADO is because they're different layers of the overall process: ADO is a consumer and AS400 is a provider. Now, here are the layers that you're looking at:

You, the user
Excel/Access
ADO
OLE DB
OLE DB provider for AS400
AS400

So, whenever you're looking to get data from somewhere to use with ADO, look for an OLE DB provider for that somewhere.

HTH

Bob
 
Bob thank you for your help. It is indeed complicated. Do you happen to have some samples code? Microsoft's docs is not too helpful.
thank you.
 
I will give it a try; i did not see any concrete examples in that manual - maybe I need to dig deeper.
Thank you Golom.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top