[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1252
  • Last Modified:

VBA Connection to AS400

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
ramimassoud
Asked:
ramimassoud
  • 4
  • 2
2 Solutions
 
Rey Obrero (Capricorn1)Commented:


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

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

0
 
Rey Obrero (Capricorn1)Commented:
post the codes that you have written ...
0
 
ramimassoudAuthor Commented:
the MyAS400 <- Stands for what?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
ramimassoudAuthor Commented:
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
 
ramimassoudAuthor Commented:
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
 
daveslaterCommented:
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
 
ramimassoudAuthor Commented:
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

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now