In many cases, diagnosing erectile dysfunction requires little more than a physical exam and a review of your symptoms. If your doctor suspects that an underlying health problem may be at play, however, he may request additional testing. Once you’ve determined the cause for your ED, you and your doctor can decide on a form of treatment – here are some of the options:
Diabetes is a well-recognized risk factor for ED. A systematic review and meta-analysis found that the prevalence of ED was 37.5% in type 1 diabetes, 66.3% in type 2 diabetes, and 52.5% in diabetes overall—a rate approximately 3.5 times higher than that in controls.  The etiology of ED in diabetic men probably involves both vascular and neurogenic mechanisms. Evidence indicates that establishing good glycemic control can minimize this risk.
Although not proven, it is likely that erectile dysfunction can be prevented by good general health, paying particular attention to body weight, exercise, and cigarette smoking. For example, heart disease and diabetes are problems that can cause erectile dysfunction, and both are preventable through lifestyle changes such as sensible eating and regular exercise. Furthermore, early diagnosis and treatment of associated conditions like diabetes, hypertension and high cholesterol may prevent or delay erectile dysfunction, or stop the erectile dysfunction from getting more serious.
Traditionally, erectile impotence (the classical definition of impotence) is the failure to achieve penile erection during intercourse. It may have either physical or psychological causes. Alcoholism, endocrine disease, and neurological disorders are typical physical causes. Psychological causes include anxiety over performance, hostility or other negative feelings toward the sexual partner, and stress, anxiety, depression, or other emotional conflicts outside of the relationship. Erectile impotence occasionally occurs with age and, although attributed by the individual to the aging process itself, it is usually secondary to disorders of aging, such as faulty blood circulation or prostate disease. In cases of impotence caused by blood vessel dysfunction, an insufficient supply of blood flows into the penis, or the blood diffuses out into adjacent tissues.
With an inflatable implant, fluid-filled cylinders are placed lengthwise in the penis. Tubing joins these cylinders to a pump placed inside the scrotum (between the testicles). When the pump is engaged, pressure in the cylinders inflate the penis and makes it stiff. Inflatable implants make a normal looking erection and are natural feeling for your partner. Your surgeon may suggest a lubricant for your partner. With the implant, men can control firmness and, sometimes, the size of the erection. Implants allows a couple to be spontaneously intimate. There is generally no change to a man's feeling or orgasm.
The dorsal artery provides for engorgement of the glans during erection, whereas the bulbourethral artery supplies the bulb and the corpus spongiosum. The cavernous artery effects tumescence of the corpus cavernosum and thus is principally responsible for erection. The cavernous artery gives off many helicine arteries, which supply the trabecular erectile tissue and the sinusoids. These helicine arteries are contracted and tortuous in the flaccid state and become dilated and straight during erection. 
The bad news: Men with diabetes are three times more likely to report having problems with sex than non-diabetic men. The most common sexual problem is Erectile Dysfunction, or ED, sometimes called impotence. Even worse, because ED is such a private issue, many men feel embarrassed to discuss the problem with their doctor, or even their partner, so the problem is never addressed.
In one study, 9.6% reported ‘occasional’ erectile dysfunction, 8.9% reported erectile dysfunction occurring ‘often’, and 18.6% reported erectile dysfunction occurring ‘all the time’. Of these, only 11.6% had received treatment.In another study, only 14.1% of men reported that they had received treatment, despite experiencing erectile dysfunction for longer than 12 months.
Due to the risk of hypotension, caution should be used in patients using alpha blockers for prostate hyperplasia and patients using other antihypertensive medications and alpha blockers, which should not be co-administered with PDE5 inhibitors. In patients who take 50 mg of sildenafil or more and use alpha blockers, sildenafil dosing should be avoided for at least 4 hours after the dose of the alpha blocker. In patients who take 25 mg of sildenafil, use of any alpha blockers is considered safe.
While pills for ED are convenient, some men sustain stronger erections by injecting medication directly into the penis. Drugs approved for this purpose work by widening the blood vessels, causing the penis to become engorged with blood. Another option is inserting a medicated pellet into the urethra. The pellet can trigger an erection within 10 minutes.
For best results, men with ED take these pills about an hour or two before having sex. The drugs require normal nerve function to the penis. PDE5 inhibitors improve on normal erectile responses helping blood flow into the penis. Use these drugs as directed. About 7 out of 10 men do well and have better erections. Response rates are lower for Diabetics and cancer patients.