0

I wrote more than 15 validation steps in script task using vb.net. Find the below sample scripts .If this condition passed more than 50K records continously my package itself getting hanged up.

If (Row.Code.ToString <> "-1" And Row.Code.ToString <> "9" And Row.Code.ToString <> "10") Then Row.IsSkipped = True Row.ErrorDesc = "Invalid Code Field!" Return End If

Find the images

enter image description here

enter image description here

Dinesh
  • 303
  • 2
  • 6
  • 19
  • I'm facing this issue frequently. Any one help me.The if condition reached around 66K records count. The package was not reading data from source or previous steps. – Dinesh Mar 22 '17 at 10:59
  • `Return` is a statement, not a function; it's an integral part of the `Function` structure (https://msdn.microsoft.com/en-us/library/2e34641s.aspx). I'm not aware of any limitation to its use in SSIS. (I'm guessing the script of interest is in "DRG_Code_Validation".) Any chance that record locks might be in the picture? – rskar Mar 22 '17 at 13:42
  • How tricky is the required validation really? The usual advice for SSIS is if you're using Script Tasks you're probably doing it wrong ("Exam 70-463: Implementing a Data Warehouse with Microsoft SQL Server", https://books.google.com/books?id=XGezBQAAQBAJ&printsec=frontcover#v=onepage&q&f=false, search in this book on "when to use the script task"). – rskar Mar 22 '17 at 13:42
  • I know it's been a year, but have you been sharpening your coding skills? For example, is Row.Code a number (such as integer)? If so, why the use of `ToString`? I.e., why not: `If (Row.Code <> -1 And Row.Code <> 9 And Row.Code <> 10) Then`? Also, in this case better to use `AndAlso` instead of `And`. – rskar Mar 22 '17 at 13:42

0 Answers0