Using ODBC with Microsoft Word
[pic]
Copyright 2004
Data Resources Corporation
What is ODBC?
ODBC stands for Open DataBase Connectivity. The files created by the Answers software are COBOL files stored in Answers specific formats. In order to be able to look at the data in any of the Answers files, you have to have an Answers programs. Even other COBOL programs would not be able to properly interpret the data without a “file layout” or description of the files. ODBC allows a file format or description to be given to capable programs, such as Microsoft Word and Microsoft Excel, so that they can understand and read the data out of the Answers files. This makes it possible for you to create your own reports and extract spreadsheet information out of your Answers data.
What do I need to use ODBC?
In order to use ODBC, you must have:
An AcuCobol ODBC license. This is an optional license that needs to be installed and configured on a PC. This license can be purchased through Data Resources Corporation and instructions are available in our ODBC User’s Guide, available at support.htm on how to install and configure the software.
You must have a software application that is ODBC capable. This software must be able to work with ODBC and extract data. Microsoft Office applications, such as Word, Excel, and Access are all ODBC capable. Other software applications are available as well.
How Do I Get Started?
The best way to learn to use ODBC is through hands-on experience. At first you may struggle, but learn the overall concepts and in no time, you will be creating reports and spreadsheets with ODBC like a pro. Knowing what files to use to get the information you need is important. You can download our ODBC User’s Guide at support.htm which includes a file list and information on what is in each file as well as general concept information for using ODBC.
Using ODBC with Microsoft Word
Example 1: Create Inventory Item Labels
This example creates inventory item labels that could be printed to code warehouse shelves or bins. The ideas presented here could be used to create any type of label, such as vendor or customer mailing labels. The main benefit to labels created through Microsoft Word is that the labels can be printed on a laser printer.
ANSWERS File: INFMAST
This example uses the Inventory Master File (INFMAST).
1. Start a new document in Microsoft Word.
2. From the menu bar, select Tools, then Mail Merge. The Mail Merge Helper window is displayed.
[pic]
3. Click on the Create button to create a new mail merge.
4. Select Mailing Labels from the list of available options to create.
[pic]
5. Select Active Window to use the current new document, or New Main Document to create a new Word Document.
6. Click on Get Data and select Create Data Source.
[pic]
7. This part of the program would allow you to create your own database records to be used in a mail merge. This would be done by typing in the values that you wanted to use. Since, we want to pull in the data through ODBC, we will click on the MS Query option.
[pic]
8. Select the data source that you want to pull the information from and click on OK. This will normally be a data source set up to pull information from ANSWERS data.
[pic]
9. Once you have selected the data source, the various “tables” available in that data source will be displayed. In ODBC, a “table” relates to the ANSWERS file. A “column” relates to the fields in the file. The files, or “tables”, are listed. Click on the + beside of the filename to display the fields. The fields you select to include will become the “columns” used by Microsoft Query. The fields selected will be the fields that you may print on the labels. Any fields that you wish to print. sort, or enter selection criteria on need to be included. To add a field click “>”. To remove a field click “ ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.