Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

connect VB program to AS/400 Database

Posted on 1998-06-23
4
Medium Priority
?
198 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 200 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you don't know how to downgrade, my instructions below should be helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 16 hours left to enroll

971 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