IBM Database Add-Ins for Visual Studio  

Importing Data to Tables and Views

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:

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.

For a DB2 database 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:


To import data to a table or view:

  1. 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.
  2. In the Data view of the IBM Data Designer, click Import.
  3. 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.

  4. For a DB2 database Optional: Specify an XML schema to use to validate a column of XML data.
    1. Expand the Options section of the Data view.
    2. Click the Validate cell of the column that contains XML data, and then click Ellipsis button.
    3. 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.

See Also

Managing Procedures, Functions, and Objects | Developing IBM Database Tables | Developing IBM Database Views | IBM Data Designer | Validate


.NET Development Forum   DB2 FAQs   IDS FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.