答案 0 :(得分:1)
尝试将查询分配给变量,如下所示
string line1= (" Insert into PMRecordedSale("+.....)
SqlConnection myConnection = new SqlConnection();
myConnection = (SqlConnection)(Dts.Connections["DbConn"].AcquireConnection(Dts.Transaction) as SqlConnection);
SqlCommand myCommand = new SqlCommand(line1, myConnection);
myCommand.ExecuteNonQuery();