Help for Setting up and accessing Remote Data Bases for storing the employee resistance test results

Normally, the EsdTest program stores the meter test data in the EsdTest Log.txt file.  However, some customers prefer to have the data stored in their own remote server data base.

This feature allows the storing of resistance test data in a customer's remote database such as Oracle, SQL2000, or Access 2000 (even though the data is already available in the EsdTest log Log.txt).  For example, after James Bond presses the test button, the following information can be stored in the remote results database:
Date and time of test  - 08/14/2005 01:02:03 PM
ID#                    - 007
Last name              - Bond
First name             - James
Workgroup designator:  - HMSS
Wrist status           - Pass
Left foot status       - High
Right foot status      - Low
Wrist resistance       - 12.34
Left foot resistance   - 100.0
Right foot resistance  -  0.03
Station ID             - A01
GMT Time difference    - -5


REMOTE RESULTS DATA BASE CREATION

Create a database with a name something like EsdTest, or use the remote names database.  If using the remote names database, it must have writing privileges.

Create a table with a name like ESD_RESULTS in the results database with the following fields:

DATE_TIME  (create as date/time field)
EMPID      (create as text or char field) 
LAST_NAME  (create as text or char field) optional
FIRST_NAME   (create as text or char field) optional
DEPT         (create as text or char field) optional
WRIST_STATUS (create as text or char field) optional
LFOOT_STATUS (create as text or char field) optional*
RFOOT_STATUS (create as text or char field) optional*
WRIST_RESISTANCE (create as text or char field) optional*
LFOOT_RESISTANCE (create as text or char field) optional*
RFOOT_RESISTANCE (create as text or char field) optional*
STATION      (create as text or char field) optional*
GMT_DIFF     (create as text or char field) optional*

optional* - Their should either be a STATUS or a RESISTANCE (or both) fields

For Oracle create an ODBC driver instance and a DSN name such as ESD.


EsdTest SETUP

Click Setup, Remote results database to open the setup window and enter the following items:

Connect String: Enter the data base connection string which for Oracle might look something like:  
   Server=WPRPROD;DSN=ESD;UID=user1;PWD=pword1 
And for SQL2000 might look something like:
   UID=;PWD=;Database=ESD_EMP_BADGE;Server=MYSERVER;Driver={SQL Server};DSN=;
And for Access .mdb might look something like:
   Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\EsdTest\EsdTest.mdb;Uid=Admin;Pwd=

SQL prefix: To insert the data into a table named ESD_RESULTS, the SQL prefix string would look like:
   INSERT INTO ESD_RESULTS                    (if using an Access table)


If using the "Import measurements from the remote data base" feature to overwrite the log.txt file with the data from the remote data base, then add the following read prefix strings

SQL read prefix: Select the fields from the view by entering something like:
   SELECT * TRANSFER.FROM ESD_RESULTS           (if using Oracle)
Or SELECT * FROM ESD_RESULTS                    (if using SQL2000)
Or SELECT * ESD_RESULTS                 (if using an Access table)

If need to delete all the data in the remote log data base (by pressing the Delete all data button) then 
SQL delete prefix: Delete all data by entering something like:
   DELETE FROM ESD_RESULTS_VW           (if using Oracle)
Or DELETE FROM ESD_RESULTS_VW           (if using SQL2000)
Or DELETE FROM ESD_RESULTS              (if using an Access table)

To disable the storing of data into the remote results database, just leave the connect string or SQL string blank, or select the 4th radio button "Add test data to log.txt file only".

Usage:

There are four usage methods, each have their own radio button in the Setup, Test Results data base configuration window:
1. "Add test data to log.txt file and the remote data base".  This adds data to both the data bases.
2. "Add test data to remote data base only" This only utilizes the customer's remote data base.  Data will not be stored in the EsdTest log.txt file, and no EsdTest test reports can be generated.  If the remote data base or network is not available then the test results will be lost.
3. "Add test data to remote data base only, but use Log.txt as a buffer if the remote data base is not available".  This is similar to the above method, but will continue to operate during network failures by buffering (temporarily storing)) the test data in the Log.txt file.  When the network becomes available, the next person to test will cause the test records in the log.txt file to be transferred to the remote data base, and those test records that were transferred will be flushed (removed) from the log.txt file.  Since data will not be stored long term in the EsdTest log.txt file, no EsdTest test reports can be generated.
4. "Add test data to log.txt file only".  The remote data base will not be used.


An example Access 2000 database (EsdTest.mdb) is included in the EsdTest directory.  The best way to get familiarized with this feature is to use this example.  You can open it with MS Access or other database editing program to see what the ESD_RESULTS table looks like, then close it.  Set up our Remote Data Base configuration window to use this database (EsdTest.mdb) as instructed above.  After an employee presses the test button on the test meter, the data will be entered into the database.







