ExecuteNonQuery() - at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
<p>When executing C# code using Script Component of SSIS, I get this error:</p>

<blockquote>
  <p>at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)<br>
  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)<br>
  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)<br>
  at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)<br>
  at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()</p>
</blockquote>

<p>Here, I am reading an excel file and dynamically create a sql server table on the file name and load the data.
This error is encountered while I am creating the Table (particularly while executing the statement "myCommand.ExecuteNonQuery(); )</p>

<p>Refer Code:-</p>

<pre><code>SqlConnection myADONETConnection = new SqlConnection();
 myADONETConnection = (SqlConnection)(Dts.Connections["LANDConn"].AcquireConnection(Dts.Transaction) as SqlConnection);
SqlCommand myCommand = new SqlCommand(tableDDL, myADONETConnection);
myCommand.ExecuteNonQuery(); 
</code></pre>

<p>What should I do?</p>