ODBC Reference Guide Introduction TRIMS is built around the Pervasive PSQL9. PSQL9 is a high performance record management system that performs all data handling operations. Open DataBase Connectivity (ODBC) is a Microsoft specification that standardizes database calls in a multi-vendor environment. This standardization is accomplished by using ODBC drivers or translator programs that allow ODBC compliant application programs and database engines to communicate. In other words, ODBC is a translator that allows Microsoft Word, Excel, Access and many other products to directly access the TRIMS data files via the PSQL9 record manager. With ODBC you can transform TRIMS data into your own spreadsheets, reports and mailing labels using your favorite Word Processor, Spreadsheet or Database program. ODBC Requirements In order to access the TRIMS data files using Microsoft Office, you must install the Data Access Options for Microsoft Office and include the Microsoft Query Function. These options can be installed at anytime using the Setup Program on your Microsoft Office CD. If you are using products other than Microsoft Office, equivalent database access functions must be installed. First Time ODBC Setup Before you can use the ODBC functions, you must identify TRIMS as the data source to be referenced, tell the system how to access the data files, and give the location of the data. Copyright by TRIMS Software LLC 1
Creating a System DSN 1. Open Control Panel, Select Administrative Tools 2. Select Data Sources (ODBC) TRIMS uses a 32 Bit ODBC Driver and if running a 64 Bit operating system you ll need to run 32 Bit Data Source Administrator. Some systems will not show both so it may be necessary to run c:\windows\syswow64\odbcad32.exe to open the appropriate ODBC Data Source Administrator. 3. Select System DSN and click Add Button 4. Select Pervasive ODBC Engine Interface from list of Drivers and click Finish Copyright by TRIMS Software LLC 2
5. Enter a Descriptive Name in the Data Source Name field and click on the Create Button 6. Enter a Database Name in the Database Name field and click Browse to locate the Data Dictionary in the TRIMS Data folder. Once folder is located click on the OK button. Copyright by TRIMS Software LLC 3
7. The ODBC Data Source Administrator window will reappear with your defined System DSN defined. Click OK to close the ODBC Administrator. The following example will illustrate how to populate an Excel Spreadsheet with data from the TRIMS Equipment Master File. Start a new worksheet using Microsoft Excel. You must have MSQuery (Optional MS Office Component) installed. Click Data Select Get External Data Select New Database Query Copyright by TRIMS Software LLC 4
Select My TRIMS Data Files from the list of Data Sources and click OK. Select Data File Next, select Equip_Master_File from the list of available TRIMS Data Files, click on the Add button and then click on the Close button. Copyright by TRIMS Software LLC 5
Select Data Fields A window will appear containing the names of each data field contained in the file to be reported. As you click on each field name, its contents will be displayed on the lower portion of the screen. Once your data fields are selected, you may use the Query Toolbar to add Selection Criteria, Format and Sort your data See Appendix B of your On-Line Reference Manual for a complete description of all Data Files and Data Fields. Returning Data to Excel To return the results of your query to Excel, click on File and select Return Data to Microsoft Excel. Excel will then ask you to specify the Row and Column for the destination of the imported data. Enter the desired Row and Column and click OK to complete the procedure. Copyright by TRIMS Software LLC 6
Using ODBC with Microsoft Word The following example will illustrate how to create a Microsoft Word Table with data from the TRIMS Equipment Master File. Start a new document using Microsoft Word. Next, click on Insert Menu then choose Database to display the Database panel. Once the Database panel is displayed, click on Get Data to display the Open Data Source panel. Click on the MS Query button to display the Choose Data Source panel. If you do not see the MS Query button, Microsoft Query has not been installed on your computer. You must have MSQuery (Optional MS Office Component) installed. Copyright by TRIMS Software LLC 7
Select Data Source Select TRIMS Data Files from the list of available data sources and click on OK. Select Data File Next, select Equip_Master_File from the list of available TRIMS Data Files, click on the Add button and then click on the Close button. Select Data Fields A window will appear containing the names of each data field contained in the file to be reported. As you click on each field name, its contents will be displayed on the lower portion of the screen. Once your data fields are selected, you may use the Query Toolbar to add Selection Criteria, Format and Sort your data See Appendix B of your On-Line Reference Manual for a complete description of all Data Files and Data Fields. Copyright by TRIMS Software LLC 8
Returning Data to Microsoft Word To return the results of your query to Microsoft Word click on File and select Return Data to Microsoft Word. The Microsoft Word Database panel will now reappear and you may use the Table Format and Query Options to format your data. Next, click on Insert Data to display the imported table in your Word Document. Copyright by TRIMS Software LLC 9