Solved

VBA Connection to AS400

Posted on 2007-11-16
7
1,239 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
[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
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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 …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

751 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