Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

connect VB program to AS/400 Database

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
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…
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

705 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