BUG: Renaming tasks or steps by using the DTS Object model results in a non-editable package (815126)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
BUG #: 364231 (SHILOH_BUGS) SYMPTOMSIf you rename tasks or steps for a Data Transformation
Services (DTS) package by using the DTS Object model, you will have a
non-editable package. For example, if a default ExecuteSQLTask step
name is DTSStep_DTSExecuteSQLTask_1, and you rename it to
DTSStep_MyExecuteSQLTask by using the DTS object model, when you double-click
the new name in DTS Designer, you receive the following error
message: Package Error: Error Source:
Microsoft Data Transformation Services (DTS) Package Error Description:
Step 'DTSStep_DTSExecuteSQLTask_1' was not found.
CAUSEThe problem is that DTS Designer maintains a reference to
the task or step name in the layout data structures. This reference is not
being updated when the task or step name is changed by the object model. The
problem is that the DTS object model is not aware of the layout and the
designer. Layout is built on top of the DTS Object Model. The task or step does
not know if it is being hosted in the designer or a user-built application when
its name is changed. As long as you use the designer to make changes,
everything works because the designer knows about the object model. However, as
soon as you move to the script to make changes, the consequences for layout are
not captured. This is the same problem as "why do I lose my layout when I save
a package programatically?" You lose your layout because the Object Model does
not know that the layout exists.
WORKAROUNDTo work around this behavior, you can use the DTS Designer or the script. Use the DTS DesignerTo rename the steps for a DTS package by using the DTS Designer, follow these steps: - Open the DTS package in the DTS Designer.
- On the Package menu, click Disconnected Edit. The Edit All Package Properties window opens.
- In the left-pane of the Edit All Package Properties window, expand Steps.
- Under Steps, click to select a step.
- In the right-pane of the Edit All Package Properties window, locate and then double-click the Name property. The Edit Property dialog box opens.
- Type a new name in the Value box, and then click OK.
- Use steps 4-6 to rename any step.
- In the Edit All Package Properties window, click Close.
Note You can only use the DTS Designer to rename a step for a DTS package. You cannot use the DTS Designer to rename a task for a DTS package. Use the scriptTo rename the steps for a DTS package by using the script, follow these steps: - Rename the steps by running the script, and then save the
package to Microsoft Visual Basic.
- Comment the package execute invocation (EXECUTE), in the
Visual Basic code.
- Remove the comment for the package save invocation
(SAVETOSQLSERVER), in the Visual Basic code.
- Compile, and then run the resulting Visual Basic code to
create a new package that is saved with steps that are named correctly and that
does not have a layout.
The next time the new package is loaded in the Designer, it will
create a default layout that matches the new step names. Note This workaround works well if you only rename the steps one
time. STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
323685
How to troubleshoot DTS packages that you run from Visual Basic applications
315661 How to run a SQL Server Data Transformation Services package from Visual Basic
Modification Type: | Major | Last Reviewed: | 9/29/2004 |
---|
Keywords: | kbBug KB815126 |
---|
|