If in doubt, always call your vet or the Animal Poison Line immediately.
The corn cob itself is not digestible. Dogs often swallow large chunks that lodge in the intestines, requiring emergency surgery to remove. Loose corn kernels are perfectly safe : just not on the cob.
If a large piece of cob was swallowed, seek veterinary advice. An intestinal blockage requires emergency surgery.