string sql = @"select monthy,processid,shiftid,empid,workqty,monthreward,qualityrate,jumprate,JumpReward,profitreward,addreward,buckqty,buckreward,realreward,persons,avgreward,judgtime from monthdonereward"; try { SqlConnection con = new SqlConnection(Config.ConnectionString); SqlCommand cmd = new SqlCommand(sql, con); SqlDataAdapter ada = new SqlDataAdapter(cmd); SqlCommandBuilder build = new SqlCommandBuilder(ada); ada.Update(dtQty);