Thanks for your question. Your erectile dysfunction may be due to high blood sugar, but there are other factors associated with the problem. There may be due to damage to nervi eregentes which is damage to the parasympathetic motor fibers that are connected to the genital organs and is associated with erection of the penis. I would advise you to have a periodical check on your blood sugar level and try to control it by having less sugar contents and junk food, which are oily and spicy. Take to light and medium exercises to shed extra calories and take alpha lipoic acid which keeps the blood sugar at the required level. If you are on medication, check out with your doctor whether the dosage is right for your blood sugar level. Eat sunflower seeds or pumpkin at least four times a day to keep your blood sugar level down. I would advise you to consult a neurologist for repair of the parasympathetic nerves through exercises and physiotherapy. Get advices on how to stay for an enhanced period before ejaculating. I hope this would solve your problem.