Script destination - no object exist with ID 171

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  integration services   » Script destination - no object exist with ID 171

Script destination - no object exist with ID 171

Topic RSS Feed

Posts under the topic: Script destination - no object exist with ID 171

Posted: 3/3/2010

Jedi Youngling 106  points  Jedi Youngling
  • Joined on: 3/3/2010
  • Posts: 28

I have an destaintion script.  All it is supposed to do is: update a table.

 

here is error message:

 

Error at DF_Update_Staff_Supervsor_Id [DTS.Pipeline]: No object exists with the ID 171.

Error at DF_Update_Staff_Supervsor_Id [Script Component [43]]: System.Runtime.InteropServices.COMException (0xC0047072): Exception from HRESULT: 0xC0047072
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.AcquireConnections(Object transaction)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction)
Error at DF_Update_Staff_Supervsor_Id [DTS.Pipeline]: component "Script Component" (43) failed validation and returned error code 0xC0047072.

Error at DF_Update_Staff_Supervsor_Id [DTS.Pipeline]: One or more component failed validation.

Error at DF_Update_Staff_Supervsor_Id: There were errors during task validation.

 (Microsoft.DataTransformationServices.VsIntegration)

------------------------------
Program Location:

   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, DataWarehouseProjectManager manager, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)

 

here is script code:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Imports

 

 

System

Imports

 

 

System.Data

Imports

 

 

System.Data.OleDb

Imports

 

 

System.Data.SqlClient

Imports

 

 

System.Math

Imports

 

 

Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports

 

 

Microsoft.SqlServer.Dts.Runtime.Wrapper

Imports

 

 

Microsoft.SqlServer.Dts.Runtime

Public

 

 

Class

ScriptMain

 

 

Inherits

UserComponent

 

 

Dim connMgr As

IDTSConnectionManager90

 

 

Dim oldbConn As

OleDbConnection

 

 

Dim oldbcmd As

OleDbCommand

 

 

Dim oldbParam As

OleDbParameter

 

 

'Dim sqlConn As SqlConnection

 

 

'Dim sqlCmd As SqlCommand

 

 

'Dim sqlParam As SqlParameter

 

 

Public Overrides Sub Input0_ProcessInputRow(ByVal Row As

Input0Buffer)

 

 

With

oldbcmd

.Parameters(

 

"@employeeNum"

).Value = Row.EmployeeNumber

.Parameters(

 

"@supervisorNum"

).Value = Row.ManagerID

.ExecuteNonQuery()

 

 

End

With

 

 

End

Sub

 

 

Public Overrides Sub AcquireConnections(ByVal Transaction As Object

)

connMgr =

 

Me

.Connections.FacilitiesActivities

oldbConn =

 

CType(connMgr.AcquireConnection(Nothing

), OleDbConnection)

 

 

End

Sub

 

 

Public Overrides Sub

PreExecute()

oldbcmd =

 

New OleDbCommand("UPDATE STAFF Set Supervisor = sv.internalstaffid FROM Staff Inner join Staff sv on sv.employeenumber = @supervisorNum WHERE staff.employeenumber = @employeeNum"

, oldbConn)

oldbParam =

 

New OleDbParameter("@employeeNum"

, OleDbType.VarChar, 10)

oldbcmd.Parameters.Add(oldbParam)

oldbParam =

 

New OleDbParameter("@supervisorNum"

, OleDbType.VarChar, 10)

oldbcmd.Parameters.Add(oldbParam)

 

 

End

Sub


Posted: 3/3/2010

Jedi Master 4924  points  Jedi Master
  • Joined on: 10/27/2009
  • Posts: 272
Answered  Answered

The 171 is the lineage id of one of the columns. One of the columns may have changed during the building process. Try remapping the columns in the input columns.

 

But why are you using a script task? Why not use the OLEDB command transform?


Page 1 of 1 (2 items)