I'm no expert or dog specialist, but I think I can answer this question generally. First thing first I would like to ask you back. What kind of sweet food? Is that artificial or source from natural stuff?
The thing is, when we talked about sweet, one word comes in mind. It's chocolate. Chocolate may cause poisoning even death in dogs. So many side effect of chocolate to dog. The best solution to avoid at all chocolate even sometime the dog owners share a little bit of their chocolate. But if the sweet comes from the fruit source then it's okay. But still depend on what kind of fruit.