These medications work by stimulating the production of insulin in pancreatic beta cells regardless of blood sugar levels. They’re most effective for people who have had diabetes for less than five years, who are at a normal weight or overweight, and who have acceptable pancreatic function. Sulfonylureas are taken daily in pill form.