[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to access AS/400 files using Visual Basic

Posted on 2000-03-23
10
Medium Priority
?
294 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
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
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month17 days, 17 hours left to enroll

831 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