Solved

VBA Connection to AS400

Posted on 2007-11-16
7
1,221 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 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

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

Author Comment

by:ramimassoud
ID: 20299123
the MyAS400 <- Stands for what?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now