Validation error. Build Files Count VIE [245]: The variable "(null)" specified by VariableName property is not a valid variable. Need a valid variable name to write to.

From what I can tell, this error is thrown when a variable is not assigned to the VariableName property; however, I definitely have a variable assigned, as seen in the image below:

"Count VIE" Row Count Properties

I've deleted the Row Count component and remade it, but the error continues to show up. Here is a snapshot of the Data Flow in question:

"Build Files" Data Flow

I'm not sure if its inclusion in a Conditional Split may be causing this error, but none of the other Row Count components seem to be throwing this error.

  • Are you typing or selecting the variable name? Variable names are case sensitive in SSIS so Could you post a screenshot of this variable? What I'd like to verify is the Name, Scope and Data Type are expected. Additionally, if you are taking advantage of inheritance and the variable is declared in a parent package, you might need to set the data flow as DelayValidate=True
    – billinkc
    Sep 27, 2012 at 15:30
  • While your variable is assigned, perhaps the way you are populating the variable is causing the issue. At runtime how is it populated? perhaps you have a config entry that is not populated or the result set of a query. - these are just a couple of examples. If you provide more detail that would be helpful
    – CPU_BUSY
    Jan 18, 2013 at 15:36
  • I'm unable to reproduce this. The only scenario where I get that error is when the variable is unset. Any time there's text in the variable name field, it gets returned in the error, regardless of whether or not the variable exists. There may be a bug in the designer. Try comparing the XML of the .dtsx between one of the Row Counts that works, and the one that doesn't.
    – Jon Seigel
    Jan 18, 2013 at 18:37
  • i got the same error, finally did nothing but save/close the package and re-open it. err went away
    – user25432
    Jun 27, 2013 at 15:41
  • close the package and repopen the dtsx.
    – user47212
    Sep 10, 2014 at 19:08

2 Answers 2


Try setting the ValidateExternalMetaData property False and then try, quite possible due to run time allocations.

Also set DelayValdiations to True, wherever applicable.

If it does not solve, then let me know!!


I just had this exact problem (error message regarding a null variable). I had added a rowcount task, which I wasn't happy with & then deleted it. At this point I had the dataflow task show the error. In SSDT 2012 a simple unload/reload of the project loaded the project successfully & cleared the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.