With the IBM® Database Add-Ins for Visual Studio,
you can use the IBM Data Designer to import data from an
input file into an IBM database table or updatable view.
You can either replace or append to the existing data.
You can import data that was exported from another IBM database
table or view, or you can import data from an external application.
The input file must be one of the following file types:
XML - XML result file
CSV - comma-delimited file
PSV - pipe-delimited file
The import process fails if a column of data in the input file
does not match the data displayed in the IBM Data Designer.
If you are importing data to a table, the import process also fails
if the data does not meet all the check constraints that are defined
for the table.
If you import data that contains one or more columns of XML data,
you can validate the XML data in each column against a specific XML
schema. Validation occurs when you save the imported data.
Requirements:
If you are importing CSV or PSV data, the first row of the import
data file is treated as a header row and discarded.
If you are importing data that contains one or more columns of XML
data, the data must have been exported through the IBM Data Designer
or from a DB2 database product.
To import data to a table or view:
In the Server Explorer under your data connection, right-click
the table or the view into which you want to import data, and
then click Show Data on the shortcut menu.
In the Data view of the IBM Data Designer, click
Import.
In the Open window, browse to the folder that contains the
data that you want to import, select the file type,
select the file, and then click Open.
The data in the Result Data section of the Data
view shows the imported data.
Optional: Specify an XML schema to use to validate a
column of XML data.
Expand the Options section of the
Data view.
Click the Validate cell of the column
that contains XML data, and then click
.
In the Validate window, select the XML schema to use
to validate the XML data in the column, and then
click OK.
The XML data is validated when you save the imported data
to the database.