string sql="";
dbhelper.ExecuteNonQuery(sql);
DataTable dt = dbhelper.GetDataTable(sql);
if (dt != null && dt.Rows.Count > 0)
{
    SqlBulkCopy bcp = new SqlBulkCopy("server=.;database=Service;uid=sa;pwd=123456");
    bcp.DestinationTableName = "InventoryDiff";
    bcp.WriteToServer(dt);
}
posted on 2014-06-05 16:13  porray  阅读(517)  评论(0编辑  收藏  举报