Sdílet prostřednictvím


Testing the Lesson 2 Tutorial Package

With the Foreach Loop container and the Flat File connection manager now configured, the Lesson 2 package can iterate through the collection of 14 flat files in the Sample Data folder. Each time a file name is found that matches the specified file name criteria, the Foreach Loop container populates the user-defined variable with the file name. This variable, in turn, updates the ConnectionString property of the Flat File connection manager, and a connection to the new flat file is made. The Foreach Loop container then runs the unmodified data flow task against the data in the new flat file before connecting to the next file in the folder.

Use the following procedure to test the new looping functionality that you have added to your package.

Checking the Package Layout

Before you test the package you should verify that the control and data flows in the Lesson 2 package contains the objects shown in the following diagrams. The data flow should be identical to the data flow in lesson 1.

Control Flow

Control flow in the package

Data Flow

Data flow in the package

To test the Lesson 2 tutorial package

  1. On Debug menu, click Start Debugging.

    The package will run. You can verify the status of each loop in the Output window, or by clicking on the Progress tab. For example, you can see that 1097 lines were added to the destination table from the file Currency_VEB.txt.

  2. After the package has completed running, on the Debug menu, click Stop Debugging.

Next Lesson

Lesson 3: Adding Package Configurations

See Also

Other Resources

Running Packages

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

5 December 2005

New content:
  • Added diagrams that show package layout.