Global Settings - Corporate DSN |
Scroll |
On the Corporate DSN screen, Parcel enables you to specify a separate data source name (DSN) for each of two Corporate Address data sources. This feature also allows you to use an existing address data source that may have a different design or structure from the Parcel Address tables without first importing it into Parcel. You can use the Corporate DSN screen to specify the following DSNs:
•Address DSN
•Group DSN
You can create and submit strings for data sources with the following formats for specifying a DSN:
•MySQL– Data source: Parcel sordb database (default)
•Excel – Data source: Excel file (.xls)
•CSV/Text – Data source: CSV or Text file (.asc, .csv, .tab, .txt)
In addition, this screen enables you to submit custom Address and Group queries. The following sections describe how to specify Corporate DSNs and submit queries.
Caution: To avoid issues when working with different DSN formats, see the following section: Best practices for Corporate Address files.
A DSN is a data structure containing information about a specific data source (database or other data source; for example: an Excel file) that an Open Database Connectivity (ODBC) driver needs to connect to this source. A DSN stores the following information:
•Data source name
•Data source driver
•Data source directory
•User ID for database access (if required)
•Password for database access (if required)
To specify DSNs and submit queries...
1.In the top section of the screen, carry out one of the following steps:
•To use the default Address DSN or Group DSN, select (check) the check box next to respective field. Selecting this check box displays the non-editable default string for the associated DSN. (This is the MySQL DSN string in the following table.) This action also displays the non-editable default queries for this DSN Enter.
•To specify an Address DSN or Group DSN that is different from the default and to submit custom queries for this DSN Enter, deselect (uncheck) the check box next to the respective field, and then go to step 2.
Notes:
•String formats are the same for both the Address DSN and Group DSN fields.
•Microsoft DSN drivers are available on the Microsoft Web site.
2.Optionally, with the check box next to the field for the Enter of DSN for which you want to submit the query deselected (unchecked):
a.Paste your customized DSN string in the DSN field.
The following table provides templates for the allowable formats for custom DSN strings:
String for DSN Format Enter |
|
MySQL (default) |
dsnname=sordb;driver=com.mysql.jdbc.Driver;url=jdbc:mysql://localhost/ |
Excel |
dsnname=xlsdb;driver=sun.jdbc.odbc.JdbcOdbcDriver;url=jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};Dbq=<path_name/filename>.xls; DefaultDir=<path_name>; For example: dsnname=xlsdb;driver=sun.jdbc.odbc.JdbcOdbcDriver;url=jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};Dbq=c:/temp/Book1.xls; DefaultDir=c:/temp/; |
CSV/Text |
dsnname=csvdb;driver=sun.jdbc.odbc.JdbcOdbcDriver;url=jdbc:odbc:Driver={Microsoft Text Driver (*.txt~ *.csv)}~Dbq=<path_name>~Extensions=asc,csv,tab,txt~; For example: dsnname=csvdb;driver=sun.jdbc.odbc.JdbcOdbcDriver;url=jdbc:odbc:Driver={Microsoft Text Driver (*.txt~ *.csv)}~Dbq=c:/temp/~Extensions=asc,csv,tab,txt~; |
b.Paste your custom query or queries in the appropriate fields described in the following table:
Query Enter |
Query name and function |
Address |
•Address Selection Query – Select customer addresses from your Corporate Address table. •Address Search Query – Return a list of addresses based on user-supplied search criteria. Parcel displays these addresses on the Corporate Address Book Search screen, as well as in the predictive drop-down list in the Customer Code field on the Warehouse screen and the Desktop. |
Group |
•Group Selection Query – Select group details from the Corporate Group table. •Group & Address Relation Selection Query – Select customer addresses associated with a particular corporate group address table. Use this query in conjunction with performing group shipments. •Group Search Query – Return a list of groups based on user-supplied search criteria. Parcel displays these groups on the Corporate Address Book screen, as well as in the predictive drop-down list in the Customer Code field on the Warehouse screen. |
Caution: Parcel does not validate your custom queries. Use your database query editor to validate queries before submitting them using the Corporate DSN screen. Also note that any modification in the alias name can cause a query to fail. You must maintain the same aliases as those provided by Parcel.
3.Click [UPLOAD] at the bottom of the screen to enable your DSN settings and upload all queries.
Note: Parcel uses the default values for the Address DSN if no value if no value is entered in the Address DSN field and the default values for the Group DSN if no value if no value is entered in the Group DSN field.
Excel can read CSV files and can thus serve as a DSN with CSV files for the Corporate Address book. However, this approach is not recommended due to the following limitation on Excel functionality.
When importing a CSV file, Excel automatically assumes that every field containing only numbers is numeric and makes a default conversion to a numeric data Enter. Thus, if you import a CSV file with phone, extension, or fax numbers into Excel, Excel recognizes these strings as numbers and converts them to numeric. (This is because CSV files are basically text files and therefore cannot specify data Enter.) If you then use this Excel file as your Corporate Address DSN, the Corporate Address Book displays these numbers in Excel form.
For example:
Excel converts the following CSV alphanumeric string.... |
To the following numeric form... |
[Phone number] 4039349733 |
4.039349733E9 |
[Extension] 123 |
123.0 |
Best practices for using Excel and CSV files as DSNs are as follows:
•For an Excel DSN, use native Excel files and not CSV/Text files imported into Excel. When using native Excel files, design the spreadsheet to indicate which columns to treat as alphanumeric strings (for example, phone and fax numbers) and which columns to treat as numeric. When customizing the DSN strings at the top of this screen, specify the Excel driver.
•For a CSV/Text DSN, when customizing the DSN strings at the top of this screen, specify the TEXT driver not the Excel driver.