In some cases, however, these drugs may be unsuitable for patients with heart disease. If you are considering one of these drugs and you have heart disease, as many diabetics do, be sure to tell your doctor. In rare cases, the pills may create “priapism,” a prolonged and painful erection lasting six hours or more (although reversible with prompt medical attention).
Centrally active compounds such as apomorphine have been used in men with ED whose cardiovascular comorbidity may prohibit PDE5i use, or in men who have concurrent apomorphine use for its anti-parkinsonian properties. Unfortunately, its side effect profile and poor effectiveness compared to other ED treatments have impaired its mainstream utilization (118). It is suspected that the side effects of apomorphine relate to its D2 receptor affinity. D4 receptor agonists, such as ABT-724 and azulenylmethylpiperazines, may not have the same associated side effects and show potent pro-erectile effects in animal models compared to apomorphine (32,119).
It is estimated that up to 20 million American men frequently suffer from impotence and that it strikes up to half of all men between the ages of 40 and 70. Doctors used to think that most cases of impotence were psychological in origin, but they now recognize that, at least in older men, physical causes may play a primary role in 60% or more of all cases. In men over the age of 60, the leading cause is atherosclerosis, or narrowing of the arteries, which can restrict the flow of blood to the penis. Injury or disease of the connective tissue, such as Peyronie's disease, may prevent the corpora cavernosa from completely expanding. Damage to the nerves of the penis, from certain types of surgery or neurological conditions, such as Parkinson's disease or multiple sclerosis, may also cause impotence. Men with diabetes are especially at risk for impotence because of their high risk of both atherosclerosis and a nerve disease called diabetic neuropathy.
Before taking any medication for erectile dysfunction, including over-the-counter supplements and herbal remedies, get your doctor's OK. Medications for erectile dysfunction do not work in all men and might be less effective in certain conditions, such as after prostate surgery or if you have diabetes. Some medications might also be dangerous if you:
The Cancer of the Prostate Strategic Urologic Research Endeavor (CaPSURE) study, designed to determine whether an individual man’s sexual outcomes after most common treatments for early-stage prostate cancer could be accurately predicted on the basis of baseline characteristics and treatment plans, found that 2 years after treatment, 177 (35%) of 511 men who underwent prostatectomy reported the ability to attain functional erections suitable for intercourse. 
Exercise and lifestyle modifications may improve erectile function. Weight loss may help by decreasing inflammation, increasing testosterone, and improving self-esteem. Patients should be educated to increase activity, reduce weight, and stop smoking, as these efforts can improve or restore erectile function in men without comorbidities. Precise glycemic control in diabetic patients and pharmacologic treatment of hypertension may be important in preventing or reducing sexual dysfunction. 
There are also alternative treatments, such as using a penis pump or a penile injection. Penis pumps work by creating a vacuum and thereby causing more blood to flow to your penis. Penile injections need to be used shortly before intercourse. They contain a medication which widens your blood vessels. A doctor’s prescription is needed for the injections.
Patient can inject medications directly into the corpora cavernosa to help attain and maintain erections. Medications such as papaverine hydrochloride, phentolamine, and prostaglandin E1 (alprostadil) can be used alone or in combinations to attain erections. All of these medications are vasodilators and work by increasing blood flow into the penis. Prostaglandin E1 (Caverject, Edex) is easier to obtain; however, it is associated with penile pain in some individuals. The use of combinations of two or three of these medications can decrease the risk of having penile pain.
Vacuum pumps are effective in most men. Successful erections are achieved in up to 90% of men using the vacuum device, however only about 69% men continue to use the device for two years or longer. The most common cause of failure is improper use of or unfamiliarity with the device. Other drawbacks to the use of vacuum devices include the need to assemble the equipment and the difficulty in transporting it. Many men also lose interest in the device because of
Using the correct size of tension ring is critical in obtaining the best possible result from this type of treatment. If the ring is too tight, it can be uncomfortable. If too large a ring is used, the erection may not last. The tension ring should not be left in place longer than 30 minutes. Leaving the ring in place for longer than 30 minutes can cause damage to the penis and further aggravate the cause of the erectile dysfunction.
Qaseem, A., Snow, V., Denberg, T. D., Casey, D. E., Forciea, M. A., Owens, D. K., & Shekelle, P. (2009). Hormonal testing and pharmacologic treatment of erectile dysfunction: A clinical practice guideline from the American College of Physicians. Annals of internal medicine, 151(9), 639-649. Retrieved from http://annals.org/aim/article/745155/hormonal-testing-pharmacologic-treatment-erectile-dysfunction-clinical-practice-guideline-from
A physical exam checks your total health. Examination focusing on your genitals (penis and testicles) is often done to check for ED. Based on your age and risk factors, the exam may also focus on your heart and blood system: heart, peripheral pulses and blood pressure. Based on your age and family history your doctor may do a rectal exam to check the prostate. These tests are not painful. Most patients do not need a lot of testing before starting treatment.