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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting XL to AS400 1

Status
Not open for further replies.

Fatbelly

Technical User
Jan 5, 2002
6
GB
Hello,

Can somebody help me with a clear answer on following:

I want to retrieve(read) into a VBA Userform data from our AS400 in real time. I have the AS400 Library, Table and Field names. I also have the Client Access Express toolkit.

What I don't know is the Code and which dll / XLL to use to archieve this. And where to find the dll. Of course the code should include possibility to passtrough the UserId/password so that the operation is not interupted.

A simple piece of example code should do the trick for me.

ps. I already searched for about a week now and most findings where or to complicated or just not the anser for my problem.

Many Thanks in advance,
Fatbelly

 
Fatbelly,

Do you have an ODBC Driver for the database that is on your AS400? If so, you can pretty simply use the built-in Excel MS Query with some customization to format queries on the fly. Just use Data/Get External Data/New Query - AS400 Database Files - Your AS400 Database File - Your Table - [Next],[Next],[Next],[Next],[Finish] - Note that you can Edit the Query.

Then, if you Macro Record Editing the query, you'll have the basic code that you'll need to query on the fly.

I have used this technique to extract data from DB2, Oracle, Access, Excel.

Skip,

[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue]
 
Fatbelly,

Either do as SkipVought sugested, or use normal ADO access using Client Access.
For this search these forums for ADO and you will find many examples.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top