title: SSIS: Dynamic SQL Query Expression VS_NEEDSNEWMETADATA Error
body: <p>I am building a SSIS package that loops through a folder and retrieves the SQL query from each file in turn. I then set an Expression equal this SQL query and pass it through a variable to a DataFlow that contains an ODBC Query (Source) and Flat File (CSV) destination.</p>
  
  <p>I initially set the SQLVariable to a SQL statement to initialize otherwise the ODBC query complains. When I execute, I get a VS_NEEDSNEWMETADATA error. I presume it is because the first file I read has a different SQL statement then the one I initially set and since I change the query SSIS is throwing metadata error.</p>
  
  <p>How to get around this error. I have over 50 SQL files of different SQL queries that must be executed in turn.</p>
  
  <p>Thanks</p>