Setting the Database Parameters

Top  Previous  Next

The database, table, and data fields are defined using the Database Parameters dialog box. This is displayed by pressing the database Change button on the main MPMileage dialog box.

 

db_panel

 

Set the parameters in this dialog box by starting at the top. As you set the parameters, MPMileage will query the underlying database and fill in the available options. Although Microsoft Excel is available as an option, it is strongly recommended that you use a proper database such as Microsoft Access or ODBC. This is explained further in the Frequently Asked Questions.

 

Start with the Data Source Type. Select the required data source type. MPMileage will only list the data source types that are installed on your PC. MPMileage currently supports Excel, Access, and ODBC. Note that the 1993-2003 and 2007 versions of Excel and Access are listed as separate options. Similarly, ODBC connections can be User DSNs (Data Source Names), System DSNs, or File DSNs.

 

If the source type requires a database file (ie. an Excel or Access file), select the input data file by pressing the Data Source "..." button. This will display the standard Windows file selection dialog box, allowing you to select the file.

 

If you have selected ODBC as the data source, then you must enter the connection's Data Source Name (DSN) in the Data Source text box. The DSN defines an ODBC connection to a database. The DSN can be a User or System DSN (as defined in the registry); or as a File DSN. Use the Data Source "..." button to select the required DSN. The ODBC options also let you specify or override the username/password. The DSN selection options and username override options are described on the Specifying an ODBC Data Source page.

 

When the database is selected, MPMileage will automatically query the database's list of available tables. These will be listed in the Table drop down box. Select the table that you wish to use. This is the one that lists the start and destination locations for each of the required routes.

 

If the data source is an Excel file, then a checkbox will be displayed. This allows you to specify if the first row of the selected spreadsheet contains the column (field) names. It is recommended that you do this, because the spreadsheet is easier to read if the column names are listed in the first row.

 

When you select the table, MPMileage will query the table's data fields and list these as available data columns.

 

You must select the Input Columns. These specify the start and end locations for each of the required routes. The lists of available columns are all the text fields that MPMileage was able to find in the specified table.

 

The Output Columns specify the columns to use for the calculation results. At least one of these must be set. The lists of available columns for the distances, times, and costs also include any numeric data fields that were found. The errors column must be at least four characters wide.

 

The Row Selection options are used to select specific database rows for processing, according to the values in the Errors column. This is explained further on the Row Selection page. The default is "Select: all rows", which tells MPMileage to compute mileages for all data rows in the selected database.

 

Press OK when all the options have been set.