Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to access AS/400 files using Visual Basic

Posted on 2000-03-23
10
Medium Priority
?
292 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Sometimes Administrators rights are not enough. These cases call for the SYSTEM account. The process in this article outlines the steps required to execute commands using the SYSTEM account.
An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

636 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