October 30, 2012 at 11:22 am
hi,
iam getting following error in script component.
TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at Data Flow Task [Script Component [93]]: The component metedata is out of sync with the compiled script. Recompile the script using the Script Component Editor.
Error at Data Flow Task [SSIS.Pipeline]: "Script Component" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------
Any help?
October 30, 2012 at 11:29 am
Any help?
Recompile the script using the Script Component Editor?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
October 30, 2012 at 11:37 am
thanks got solve.
but now my script component running indefinitely,
below is code in script component.
#Region "Help: Introduction to the Script Component"
' The Script Component allows you to perform virtually any operation that can be accomplished in
' a .Net application within the context of an Integration Services data flow.
' Expand the other regions which have "Help" prefixes for examples of specific ways to use
' Integration Services features within this script component.
#End Region
#Region "Imports"
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
#End Region
' This is the class to which to add your code. Do not change the name, attributes, or parent
' of this class.
<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _
<CLSCompliant(False)> _
Public Class ScriptMain
Inherits UserComponent
#Region "Help: Using Integration Services variables and parameters"
'To use a variable in this script, first ensure that the variable has been added to
'either the list contained in the ReadOnlyVariables property or the list contained in
'the ReadWriteVariables property of this script component, according to whether or not your
'code needs to write into the variable. To do so, save this script, close this instance of
'Visual Studio, and update the ReadOnlyVariables and ReadWriteVariables properties.
'To use a parameter in this script, follow the same steps. Parameters are always read-only.
'Example of reading from a variable or parameter:
' startTime = Variables.MyStartTime;
'Example of writing to a variable:
' Variables.myStringVariable = "new value";
#End Region
#Region "Help: Using Integration Services Connnection Managers"
'Some types of connection managers can be used in this script component. See the help topic
'"Working with Connection Managers Programatically" for details.
'To use a connection manager in this script, first ensure that the connection manager has
'been added to either the list of connection managers on the Connection Managers page of the
'script component editor. To add the connection manager, save this script, close this instance of
' Visual Studio, and add the Connection Manager to the list.
'If the component needs to hold a connection open while processing rows, override the
'AcquireConnections and ReleaseConnections methods.
'Example of using an ADO.Net connection manager to acquire a SqlConnection:
' Dim rawConnection As Object = Connections.SalesDB.AcquireConnection(Transaction)
' Dim salesDBConn As SqlConnection = CType(rawConnection, SqlConnection)
'Example of using a File connection manager to acquire a file path:
' Dim rawConnection As Object = Connections.Prices_zip.AcquireConnection(Transaction)
' Dim filePath As String = CType(rawConnection, String)
'Example of releasing a connection manager:
' Connections.SalesDB.ReleaseConnection(rawConnection)
#End Region
#Region "Help: Firing Integration Services Events"
'This script component can fire events.
'Example of firing an error event:
' ComponentMetaData.FireError(10, "Process Values", "Bad value", "", 0, cancel)
'Example of firing an information event:
' ComponentMetaData.FireInformation(10, "Process Values", "Processing has started", "", 0, fireAgain)
'Example of firing a warning event:
' ComponentMetaData.FireWarning(10, "Process Values", "No rows were received", "", 0)
#End Region
Public Enum Segments
TH
PHA
PAT
IS1
End Enum
Dim arrLine As String()
Dim segmentcode As String
Dim counter As Integer
Dim linenumber As Integer = 1
Dim segmenetsequence As Hashtable = New Hashtable()
Dim setid As Guid = Guid.NewGuid()
'This method is called once, before rows begin to be processed in the data flow.
'
'You can remove this method if you don't need to do anything here.
Public Overrides Sub PreExecute()
MyBase.PreExecute()
'
' Add your code here
'
End Sub
' This method is called after all the rows have passed through this component.
'
' You can delete this method if you don't need to do anything here.
Public Overrides Sub PostExecute()
MyBase.PostExecute()
'
' Add your code here
'
End Sub
'This method is called once for every row that passes through the component from Input0.
'
'Example of reading a value from a column in the the row:
' zipCode = Row.ZipCode
'
'Example of writing a value to a column in the row:
' Row.ZipCode = zipCode
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
arrLine = Row.LineText.Split("*"c)
segmentcode = SegmentValue(arrLine, 0)
Row.LineNumber = linenumber
Row.Setid = setid
counter = arrLine.Length
linenumber += 1
Select Case (segmentcode.ToUpper())
Case Segments.TH.ToString.ToUpper()
Row.TH01 = SegmentValue(arrLine, 1)
Row.TH02 = SegmentValue(arrLine, 2)
Row.TH03 = Convert.ToInt32(SegmentValue(arrLine, 3))
Row.TH04 = SegmentValue(arrLine, 4)
Row.TH05 = Convert.ToDateTime(SegmentValue(arrLine, 5))
Row.TH06 = SegmentValue(arrLine, 6)
Row.TH07 = SegmentValue(arrLine, 7)
Row.TH08 = Convert.ToInt32(SegmentValue(arrLine, 8))
Row.TH09 = SegmentValue(arrLine, 9)
Case Segments.IS1.ToString.ToUpper()
Row.IS01 = SegmentValue(arrLine, 1)
Row.IS02 = SegmentValue(arrLine, 2)
Row.IS03 = SegmentValue(arrLine, 3)
Case Segments.PHA.ToString.ToUpper()
Row.PHA01 = SegmentValue(arrLine, 1)
Row.PHA02 = SegmentValue(arrLine, 2)
Row.PHA03 = SegmentValue(arrLine, 3)
Row.PHA04 = SegmentValue(arrLine, 4)
Row.PHA05 = SegmentValue(arrLine, 5)
Row.PHA06 = SegmentValue(arrLine, 6)
Row.PHA07 = SegmentValue(arrLine, 7)
Row.PHA08 = SegmentValue(arrLine, 8)
Row.PHA09 = SegmentValue(arrLine, 9)
Row.PHA10 = SegmentValue(arrLine, 10)
Row.PHA11 = SegmentValue(arrLine, 11)
Row.PHA12 = SegmentValue(arrLine, 12)
Case Segments.PAT.ToString.ToUpper()
Row.PAT01 = SegmentValue(arrLine, 1)
Row.PAT02 = SegmentValue(arrLine, 2)
Row.PAT03 = SegmentValue(arrLine, 3)
Row.PAT04 = SegmentValue(arrLine, 4)
Row.PAT05 = Convert.ToInt32(SegmentValue(arrLine, 5))
Row.PAT06 = SegmentValue(arrLine, 6)
Row.PAT07 = SegmentValue(arrLine, 7)
Row.PAT08 = SegmentValue(arrLine, 8)
Row.PAT09 = SegmentValue(arrLine, 9)
Row.PAT10 = SegmentValue(arrLine, 10)
Row.PAT11 = SegmentValue(arrLine, 11)
Row.PAT12 = SegmentValue(arrLine, 12)
Row.PAT13 = SegmentValue(arrLine, 13)
Row.PAT14 = SegmentValue(arrLine, 14)
Row.PAT15 = SegmentValue(arrLine, 15)
Row.PAT16 = SegmentValue(arrLine, 16)
Row.PAT17 = SegmentValue(arrLine, 17)
Row.PAT18 = Convert.ToDateTime(SegmentValue(arrLine, 18))
Row.PAT19 = SegmentValue(arrLine, 19)
Row.PAT20 = Convert.ToInt32(SegmentValue(arrLine, 20))
Row.PAT21 = Convert.ToInt32(SegmentValue(arrLine, 21))
Row.PAT22 = SegmentValue(arrLine, 22)
Row.PAT23 = SegmentValue(arrLine, 23)
Row.PAT24 = SegmentValue(arrLine, 24)
End Select
End Sub
Public Function SegmentValue(ByRef LineArray As String(), ByVal Counter As Integer) As String
Throw New NotImplementedException
If LineArray.Length > Counter Then
Return LineArray(Counter).ToString().Trim()
End If
Return String.Empty
End Function
End Class
iam using sql 2012 and vb shell 2010
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply