#### Sending Data to a Local Datapage+ Database

To send statistical data from PC-DMIS to a local database used in Datapage+, you may need to create a new database.

Important: Legacy Datapage databases use a different database structure than Datapage+. Therefore, they cannot be used inside Datapage+. To continue building upon your existing data set you will need to perform a dump (or export) of your data and then import that data into a new Datapage+ database using Datapage+'s Tools | Database Import menu item. See the Datapage+ documentation on "Importing Data from an ASCII File" for more information.

Once you have a database created, if you're using PC-DMIS v2010 or higher, you can then connect to that database from within your STATS/ON command. If you're using a version prior to v2010, consult the Data Transfer Matrix below. The steps below assume you are using v2010.

Step 1: Install .NET Framework v3.5

Before you can send data to PC-DMIS, your computer system must have the .NET Framework v3.5 installed. If needed, you can install it from this link:

- http://msdn.microsoft.com/en-us/netframework/default.aspx

Step 2: Creating a New Database

If you want to use a new database with Datapage+, you will need to use the Database creation tools inside of Datapage+. To do this, start Datapage+, and select Tools | Database connection. See your Datapage+ documentation for information on creating the new database.

This will automatically create a database and data source for you to connect to from within PC-DMIS. Once you have the database created, follow the instructions below to connect to an existing database.

Step 3: Connecting to an Existing Data Source and Database

This step describes how to connect a STATS/ON command to an existing data source and database.

1. Select Insert | Statistics Command | Statistics. The Statistics Options dialog box appears.

2. Select Datapage+ from the Database options area.

3. From the Data source list, select the name of your data source. If needed, specify a user name and password in the appropriate boxes.

4. Click Test Connection. If you have set things up correctly you will get a "Succeeded" message.

Note: The demo database that ships with Datapage+ is only for viewing purposes. You should not use it to send data from PC-DMIS.

5. Click OK to close the Statistics Options dialog box. Now, your STATS/ON command should send statistical data to the specified data source. You final STATS/ON command might look something like this:

STATS/ON,DATAPAGE+,dpplus_database

This connects to an existing database named dpplus_database.

Data Transfer Matrix

This table lists the methods you should use to transfer statistical data and CAD data to the Datapage+ database.

PC-DMIS Version | Use STATS/ON Command | Use XML Statistics Tools | CAD
PC-DMIS v2010 and higher | Yes | No | Select File | Export | XAML. Then import the XAML into Datapage+.
PC-DMIS v2009 and v2009 MR1 | No | Yes | Select File | Export | XAML. Then import the XAML into Datapage+.
Versions before PC-DMIS v2009 | No | Yes | Import the PC-DMIS .CAD file into Datapage+.

- Using the STATS/On Command - For v2010 and higher, use a PC-DMIS STATS/ON. It should be placed at the beginning of your part program.

- Using the XML Statistics Tools - For versions before v2010, a utility called DataPageStats.exe has been provided in the directory where Datapage+ is installed. Your part program should contain an External Command pointing to this .exe file. This external command should be placed at the end of your part program. It creates and .xml file with your statistical data with each execution. You can then use a second utility called PcdmisXMLStatsToDatabase.exe to monitor that directory and pull the data from the .xml files into the database.

For more in-depth information, see the ReadMe.doc file that ships with Datapage+ and also the "XML Statistics Tools" section of the Datapage+ documentation.