How to Import Data from Aspen into SQL 2000
Microsoft Sequel Server 2000 has a utility called DTS Import/Export Wizard. DTS stands for Data Transformation wizard. This wizard can be used to import data from your Aspen working.mdb into MS Sequel Server 2000. Before you import data you will need to create a SQL database and run the scripts provided when you purchased Aspen Enterprise. After the scripts run all Tables, triggers and constraints will be created.
There are numerous tables in Aspen that have auto number fields. These same fields in MS SQL are referred to as Identity fields. The tables with Identity fields are listed in the section below titled Groupings of Aspen tables for importing into SQL. If you have data to import into any of the tables with identity fields you will need to remove or set the identity to No. For example let’s look at the Samples table. Click on the table and then right click to get more menu options.
Select Design. You will be presented with a list of fields and their datatypes.
Notice that the LIMS number field is an integer and the column allows nulls is not checked. If we look at the bottom portion of the screen you will notice that the setting Identity is set to Yes. Click in this field and change the value to No.
Close the table and confirm saving of the structure. Continue to do this for all tables you wish to import data into that have identity fields.
Now you are ready to start the DTS wizard. Select the Database and then right click, selecting the All tasks. This will then present another listing of menus, select Import Data.
The DTS wizard starts up.
Click Next. You will need to select Microsoft Access from the drop down list for your Data Source. Next enter the file path and name to working.mdb. You can use the browse function by clicking on the ellipses button next to the field File Name. Now type in your lims administrator Username and password. Before you click Next you must click on the Advanced Button.
You need to enter the path to the workgroup file apsen.mdw in the property Jet OLEDB System Database. You can simply click in the value column and type in the path and file name (there isn’t the option to browse to this file – you will need to type in the value).
When you are done click OK. You will be brought back to the originating form. You can now click on Next. If you did not enter the correct path to the aspen.mdw file when you click on Next an error message will be displayed indicating that you do not have permissions.
The next form asks if you want to copy the tables or create a query. For this article we will select Copy.
Click Next. Now a list of tables found in working.mdb will be presented.
Select the tables you want to import. You must select a grouping of tables as outlined below. If you don’t have any data to import into a table do not check it. You will need to import data from the “First Group” and then start the DTS wizard again to import data from the Second group. This is important to prevent errors due to referential integrity.
Groupings of Aspen tables for importing into SQL
** Indicates tables with Identity fields
After you are finished importing data without any errors you must go back to the tables with identity fields and set the identity back to Yes and set the Seed value. The set value is the last value for the identity field. For example you can open the Samples table and find the last LIMS#. If this LIMS# is 16789 that is the value you would enter into the Identity Seed field.
Once you have set the Identity back to Yes and set the Seed Identity value, close the table and save your changes. Repeat this for all tables that you previously changed the Identity to No.