All: I'm using Visual Studio 2013. I'm at my wits end with this: For some odd reason my package ends abruptly at the highlighted area below (It's supposed to go directly to "Update File Log" execute SQL task but it ends at the previous Script Task and completely ignores it.
Any thoughts? Thanks.
Please see code below. The error I get is that absolutely useless "exception has been thrown by target of an invocation". This occurs at the arrow indicator, right before the sqlcommand fires:
SqlConnection myADONETConnection = new SqlConnection()
myADONETConnection = (SqlConnection)
(Dts.Connections["DBconn"].AcquireConnection(Dts.Transaction) as SqlConnection);
MessageBox.Show(tableDDL.ToString());
SqlCommand myCommand = new SqlCommand(tableDDL, myADONETConnection); <===
myCommand.ExecuteNonQuery();
MessageBox.Show("TABLE IS CREATED");
//Load the data from DataTable to SQL Server Table.
SqlBulkCopy blk = new SqlBulkCopy(myADONETConnection);
blk.DestinationTableName = "[" + filename + "]";
blk.WriteToServer(dt);
MessageBox.Show("TABLE IS filled");
Here is the tableDDL syntax that is getting created - anyone see an issue?