title: SSIS Execute SQL Query error with DateTime Input Parameter
body: <p>I have spent a few days trying to fix this problem.  I have a SSIS package with 2 execute SQL tasks within a sequence container, one is a simple delete from table and the next one an simple insert the delete precedes the insert. The delete works fine so the connection etc is ok.</p>
  
  <p>The Insert is failing with the following vague and unhelpful message.</p>
  
  <pre><code>failed with the following error: "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. 
  </code></pre>
  
  <p>The insert has 1 input parameter which is a date which is bound to a datetime variable set to 01/01/2011.  When I replace the ? in the sql task query with a hard coded date the task works. I have also looked at the locals at a pre-execute event break point on the insert task and the variable is ok.</p>
  
  <p>I also fired up a SQL Profiler session and I see the delete query hitting the DB but nothing for the insert (when it uses the input parameter).</p>
  
  <p>I am using Visual Studio 2005 Pro SP1 (Not my choice) and SQL Server 2005 SP3.</p>
  
  <p>Regards</p>
  
  <p>Mark</p>