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
Solved

VBA Connection to AS400

Posted on 2007-11-16
7
1,233 Views
Last Modified: 2013-11-27
I need to write a VBA Fuction on MS Access to connect to the AS400 database.

I am finding problems executing the script i have written in the module. Can you please write for me a proper code that will allow me to do the connection and also write another script to create an sql query in order to put the data in a record set.

0
Comment
Question by:ramimassoud
  • 4
  • 2
7 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 300 total points
ID: 20299061


  -- ODBC Driver for AS/400 (from IBM)

oConn.Open "Driver={Client Access ODBC Driver (32-bit)};" & _
           "System=myAS400;" & _
           "Uid=myUsername;" & _
           "Pwd=myPassword"

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 20299091
post the codes that you have written ...
0
 
LVL 1

Author Comment

by:ramimassoud
ID: 20299123
the MyAS400 <- Stands for what?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 1

Author Comment

by:ramimassoud
ID: 20299151
and also, please include the whole, script it is still not woirking. I mean, please write the script from start till end including the variables definitions. and should i include any library. in the Reference...
0
 
LVL 1

Author Comment

by:ramimassoud
ID: 20299341
I keep on getting this message when I try to run the script. It says: Error accessing file. Network Connection May have been lost.
0
 
LVL 14

Assisted Solution

by:daveslater
daveslater earned 200 total points
ID: 20338203
Hi
first you need client access on you PC.
then look at this question and post back and queries

http://www.experts-exchange.com/Programming/Programming_Platforms/AS400/Q_20865100.html

Dave
0
 
LVL 1

Author Comment

by:ramimassoud
ID: 20342112
hey man I did.. it worked... not I need some help in some other things... I'll post back a question in a couple of min... What I did is I created a new blank database and it worked... but on the database I am working it did not... so I guess I have to start from scratch on the new database... but no problem as long as it worked... thanks buddy...
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding new field to an existing database in access 3 23
update query 4 22
Error can't find table ?? 5 20
Record Lock on Database will not go away 9 17
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

789 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