Solved

connect VB program to AS/400 Database

Posted on 1998-06-23
4
189 Views
Last Modified: 2013-11-14
question : Is it possible to create a connection between a as/400
database and a visual basic program and if it is how do you create it. I
think ODBC will do the trick but that isn't my field of expertice.
please insert a sample code into your code (that will probebly explain
more than a normal answer).
0
Comment
Question by:molli500
[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
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
trkcorp earned 100 total points
ID: 1464053
ODBC is the answer and DAO or RDO in VB.  To Create an ODBC driver use the ODBC32 icon in your control panel.  You must have the required AS/400 ODBC database driver loaded on your PC.  If you do then it will be one of the choices available in ODBC32.  If not you will have to load the driver before you can get anywhere.  The driver should be supplied by IBM and is probably bundled somewhere in Client Access.
Once you are over this hump, you will need a connection string like "ODBC;UID=YourUserID;PWD=YourPW;DSN=YourODBCname;DATABASE=YourFilename" but there may be some variation depending on security and thec particular driver.
I know this does not answer all of your concerns but it should point you in the right direction.
0
 

Author Comment

by:molli500
ID: 1464054
i would like to get a connection without having to install client access, is this also possible?
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 1464055
molli, you first place the drivers in your development environment... i.e. on your development machine.  Once you have accomplished this you are allowed to include the drivers in any installation program you may create. (Look in the VB folder of your VB installation CD for the ODBC folder for more on this installation option included with VB.  Personally, I use Installshield Express which provides an easier and very friendly way to include ODBC drivers...) This would allow your installation pgm place and register the ODBC drivers on the target machine...  i.e., the target machine need not have C/A 400 installed in order to use the ODBC driver.  
If your question is really how do I get the drivers on my PC without installing some part of C/A 400; I'm not so sure you can.  IBM has a very good book on ODBC online which should answer most any question you may have about implementing and using ODBC.  Go to > http://as400bks.rochester.ibm.com/cgi-bin/bookmgr/bookmgr.cmd/BOOKS/QBKADE01/CONTENTS#PREFACE.5 and read all about ODBC & the AS/400.
(The dash in cgi-bin should be included.)  Good luck...
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1464056
Bought This Question.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 13 hours left to enroll

635 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