Solved

connect VB program to AS/400 Database

Posted on 1998-06-23
4
180 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now