?
Solved

How to access AS/400 files using Visual Basic

Posted on 2000-03-23
10
Medium Priority
?
291 Views
Last Modified: 2008-02-01
I have tried to access files on the AS/400 using Visual Basic and ADO, but with no success.

I am using the following: Client Access V3R2M0, OS/400 V4R4M0, Windows NT 4.0, and Visual Basic 6.0 (SP3).

Any help would be greatly appreciated.
0
Comment
Question by:jshattuck
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 3

Expert Comment

by:P_S_Price
ID: 2649754
Why not Use ODBC through the VN Access engine
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2650297
Surely if you can use ODBC you can use ADO also.

Just to eliminate all other possibilities, you can successfully use ADO to access something else, e.g. an Access database?
0
 

Expert Comment

by:TGB
ID: 2653660
We're running NS Administrator, with NT 4.0 .... and to access files on the 400 from within VB we have to use ICF files to handle the transfer of data between VB6.0 and the 400.
This needs an RPG program to get the data from the files, and then pass it to the PC through the ICF file. The VB program then retrieves this data and does what you want with it. Writing any data back to the 400 is handled the same way, but in reverse ;)
If you want any more info on this method, get in touch.... hope this helps.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 7

Expert Comment

by:twol
ID: 2662162
Is your ado connection working okay?
If so then make sure you are using a client side cursor. We're accessing fine. But when you use a host cursor, sometimes the record count will be -1.
0
 
LVL 3

Expert Comment

by:jetforce
ID: 2672580
I have not used Client Access for a very very very long time, I have no trouble accessing the AS400 using RUMBA ODBC drivers, I would imagine this would be the same way except for the dsn. Try something like this

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset

conn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties='DSN=AS400;';Initial Catalog=S44F1966"
  conn.CursorLocation = adUseClient
  conn.Open , "Username", "PASSWORD"

Set rs.ActiveConnection = conn
rs.CursorType = adOpenForwardOnly
rs.CursorLocation = adUseClient

rs.Open "Select * from ALibrary/ATable"


PS your library and table might need seperating by . instead of /.

Also make sure you have created your dsn

Cheers
0
 

Expert Comment

by:Nelmarcas
ID: 2686062
Why don't you use Client Acess Express V4R4?  
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2762880
what protocol are you using? if tcp/ip i dont think it is supported with icf.  you will need to use the appc protocol.  or i believe if you have a product such as Netsoft router to allow the vb appc routine to work with the tcp/ip connection
0
 

Accepted Solution

by:
Hezi earned 800 total points
ID: 2772806
If you use
Client Acess Express V4R4,
You can use ADO and OLEDB, Best features.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6401614
This question was LOCKED with a PROPOSED ANSWER and awaits your decision today.  Once a question is LOCKED with a Proposed Answer, few new experts will step in to help on that question, since the assumption is, you've been helped.  If the Proposed Answer helped you, please accept it and award that expert.  If it did not help you, please reject it and add comments as to status and what else is needed.
 
If you wish to award multiple experts, just comment here with detail, I'll respond as soon as possible.  As it stands today, you asked the question, got help and not one expert was awarded for the contribution(s) made.  Your response is needed.  I'll monitor through month end, and if you've not returned to complete this, we'll need to decide.  Expert input is welcome (as always) to determine the outcome here if the Asker does not respond.
 
Your response in finalizing this (and ALL) your question(s) is appreciated.
 
Moondancer
Community Support Moderator @ Experts Exchange

0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6890909
ZERO reponse to my request above;  therefore finalized today by EE Moderator.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question