Solved

connect VB program to AS/400 Database

Posted on 1998-06-23
4
179 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
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
trkcorp earned 100 total points
Comment Utility
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
Comment Utility
i would like to get a connection without having to install client access, is this also possible?
0
 
LVL 4

Expert Comment

by:trkcorp
Comment Utility
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
Comment Utility
Bought This Question.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now