Coupling Microsoft Access with NI Requirements Gateway Contents Using the Access Type This document explains how NI Requirements Gateway interfaces with Microsoft Access. Use this document to familiarize yourself with the Access type in Requirements Gateway. Refer to Appendix A, Third-Party Types Overview, of the Getting Started with NI Requirements Gateway manual for more information about the elements of the Access type. Using the Access Type... 1 Access Settings... 2 Macro Security... 2 Database Format... 2 Selecting Access Files to Analyze... 3 Variables of the Access Type... 4 Requirements Traceability... 4 Capturing Information from Access Tables... 4 Requirements... 4 References... 4 Creating References from Requirements Gateway... 5 Intermediate File... 5 The Access type captures traceability information from a single Access database (.mdb) file. The database file contains multiple tables, you can select the specific tables you want to analyze. This type does not support Access 2007 (.accdb) files, but you can use Access 2007 in compatibility mode to open Access 2003 or earlier (.mdb) files. Note When Requirements Gateway opens an Access database, Access might display a Security Warning dialog box that prompts you for permission to open the database. If you do not give permission to open the database, or if Access already has the database open with exclusive access, Requirements Gateway fails to open the database and displays an error for the Access document in the main window.
Access Settings To use the Access type with Requirements Gateway, you must install Access, minimize the macro security, and set the default database format to Access 2000. Macro Security (Access 2007) Complete the following steps to minimize the macro security. 1. Click the Microsoft Office button in the upper left corner of the Access window to launch a popup menu. 2. Click the Access Options button at the bottom of the popup menu to launch the Access Options dialog box. 3. Click the Trust Center tab to launch the Trust Center dialog box. Note Depending on your configuration, clicking the Trust Center tab in step 3 might display the Trust Center pane of the Access Options dialog box instead of launching the Trust Center dialog box directly. If the Trust Center pane displays, click the Trust Center Settings button on the Trust Center pane to launch the Trust Center dialog box. 4. Click the Macro Settings tab to display the Macro Settings pane. 5. Select the Enable all macros (not recommended; potentially dangerous code can run) option. 6. Click OK twice to close the Trust Center dialog box and the Access Options dialog box. (Access 2003) Complete the following steps to minimize the macro security. 1. Select Tools»Macro»Security to launch the Security dialog box. 2. Click the Security Level tab. 3. Select Low. 4. Click OK to close the Security dialog box. Database Format (Access 2007) Complete the following steps to set the default database format to Access 2000. 1. Click the Microsoft Office button in the upper left corner of the Access window to launch a popup menu. 2. Click the Access Options button at the bottom of the popup menu to launch the Access Options dialog box. 3. Click the Popular tab to display the Popular pane. Coupling Microsoft Access with NI Requirements Gateway 2 ni.com
4. In the Creating databases section of the Popular pane, select Access 2000 from the Default file format ring control. 5. Click OK to close the Access Options dialog box. (Access 2003) Complete the following steps to set the default database format to Access 2000. 1. Select Tools»Options to launch the Options dialog box. 2. Click the Advanced tab. 3. In the Default File Format section, select Access 2000 from the ring control. 4. Click OK to close the Options dialog box. Selecting Access Files to Analyze When you add an Access document to a project, you must first specify the files to include in the document. Click the File Browse button in the File or Directory column on the Project pane to launch the Open dialog box, in which you can browse for the individual.mdb file you want to use. After you select the.mdb file, Requirements Gateway launches the Select some tables dialog box, in which you can select the specific tables in the database that you want to analyze, as shown in Figure 1. Figure 1. Select some tables Dialog Box After you select a table, the table name appears in the Value column for the Access document, as shown in Figure 2. National Instruments Corporation 3 Coupling Microsoft Access with NI Requirements Gateway
Variables of the Access Type When you add an Access document to a project, the Table variable becomes available in the Variable column on the Document Details pane of the Project pane, as shown in Figure 2. Requirements Traceability Figure 2. Document Details Pane for an Access Document Use the Table variable to specify that you want to capture traceability information from one or more specific tables in an Access document. Enter the names of the tables, separated by an exclamation point (!), in the Value column. You can perform traceability analysis on Access documents by capturing traceability information from tables in an Access database or by creating references in the Graphical View in Requirements Gateway. Capturing Information from Access Tables You can capture traceability information from an Access document if the table contains the correct columns for requirements and references. Requirements For the default Access type, a table must contain the following columns for requirements: Requirement ID The requirement identifier. Requirement Label The title of the requirement written in natural language. Requirement Text The text of the requirement. References For the default Access type, a table must contain a column named Covered Requirements that contains the list of covered requirements separated by commas. Coupling Microsoft Access with NI Requirements Gateway 4 ni.com
Creating References from Requirements Gateway Intermediate File You can use the Graphical View to create references between a requirement and an Access document or an element of an Access document. Refer to the NI Requirements Gateway Help for more information about creating references using the Graphical View. After you create a reference, you can click the Coverage Analysis View tab and select the covering document or element in the Selection column. The Upstream Coverage Information column shows all the requirements that the selected document covers. For references that you created in the Graphical View, Requirements Gateway identifies the covered requirements with an internal creation reference attribute. The Access type captures the content of the tables in an Access file and generates an XML intermediate file that contains XML tags for the table, each record in the table, and each cell of a record. The intermediate file uses the name XML attribute to identify each cell, and the text between each tag indicates the content of the cell. The XML structure is the same for all Access documents and includes cells for the following information: Record ID Requirement ID Requirement Label Requirement Text Priority Level attribute Allocation attribute Safety attribute Category attribute Note The Priority Level, Allocation, Safety, and Category attributes refer to the attributes that the default Access type defines in Requirements Gateway, not XML attributes. National Instruments Corporation 5 Coupling Microsoft Access with NI Requirements Gateway
Figure 3 shows an example of an Access table named High Level Requirements that contains all the required columns. Figure 3. Access Source File The intermediate file that the Access type generates includes XML attributes for each cell that corresponds to the required columns, as shown in Figure 4. Figure 4. Access Intermediate File National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies. For patents covering National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents. 2009 National Instruments Corporation. All rights reserved. 372693A-01 Jan09