Iron Speed Designer’s Application Wizard places a “Data Import Wizard” button in selected table panels, such as in the Show Table page. Imported files are in ASCII comma separated value (CSV) format, one data record per file row.
|
|
|
An ASCII CSV data file. |
Pop-ups must be enabled on your web browser in order to display the Data Import Wizard.
Step 1: Select the ASCII CSV file you wish to import.
|
|
|
The file selection step of the Data Import Wizard. |
Step 2: Map the fields in the ASCII CSV file to the database fields into which the data is to be imported. The Data Import Wizard displays the first few rows of data in your file to help you map the columns in your file to the database fields.
|
|
|
The data mapping step of the Data Import Wizard. |
If the Data Import Wizard finds column names in your file that match the database field names, then those columns are automatically mapped to those database fields. Unmatched data columns remain unselected, and you should manually map any column you wish to import.
Be sure to select the ‘Import’ check box for the columns you wish to import and unselect the check box for columns you do not want to import.
The Data Import Wizard supports ASCII comma separated value (CSV) files. ANSI CSV files are not supported. Data must be separated by a comma (,). If data elements are separated by a space character, then the Data Import Wizard will consider them as one single data field rather than multiple data fields.
Data elements can be text strings without any quotes:
Fred Jones, The Big Corporation
Data elements can be enclosed in single quotes:
‘Fred Jones’, ‘The Big Corporation’
Data elements can be enclosed in double quotes:
“Fred Jones”, “The Big Corporation”
Data elements can contain commas if enclosed within single quotes:
‘$12,587’, ‘Big Riding Lawnmower’
Data elements can include commas if enclosed within double quotes:
“$12,587”, “Big Riding Lawnmower”
Data rows can end with a comma:
“Fred Jones”, “The Big Corporation”,
Data rows can be separated with multiple new lines:
“Fred Jones”, “The Big Corporation”
“Michael Bigglesworth”, “MB and Associates”
When importing data, the Date, Currency, and Number formats in the CSV file should match the application’s format settings so that values are imported properly.
Number of data columns in the CSV file must match the number of column headings in first row if the file has a column header row. For example, if the column heading row has five columns then all other data rows in the file must have five columns.
Note however, it is not necessary for the data file to have same number of columns as the database table.
Importing data is only supported for database tables. Data cannot be imported into database views.
If the table’s primary key is computed, automatically generated by the database, or automatically incremented by the database, then the Data Import Wizard cannot import the primary key column. If your data file contains primary keys, they can be skipped by unselecting the primary key column in the Data Import Wizard.
If the primary key field is not computed, automatically generated or automatically incremented then the Data Import Wizard can import primary keys only if a record does not already exist in the database with same primary key value.
If the table has a foreign key field, then the Data Import Wizard first attempts to locate an existing record in the foreign key table with same foreign key value. If the Data Import Wizard finds such a record, it will use the primary key value for that foreign key record and insert it into the newly imported record’s foreign key field.
If the Data Import Wizard cannot find a matching record in the associated foreign key table, then it first attempts to insert a new record in the foreign key table with value in the imported data record. If the foreign key record is created successfully then the Data Import Wizard gets the primary key of the newly created record and inserts it into the imported record.
The Data Import Wizard cannot import data into read-only, computed in the database and automatically generated database fields. These fields are effectively ‘read only’.
Do not import data files exported from applications using a different culture than the application server into which the data is being imported. The Data Import Wizard can import data if data does not violate database constraints, but some data may lose its meaning due to cultural conversion, especially for currency conversion.
If you have large amount data then the Data Import Wizard may time out. To avoid this, increase your application’s request time by adding or updating the following in your application’s Web.config file:
<system.web>
<httpRuntime executionTimeout="{Your time-out value}"/>
</system.web>
Replace {Your time-out value} according to your need.
Creating Your First Application