From the website of the United Arab Emirates Embassy:
http://www.uaeembassyuk.net/
(See 'Health concerns' and 'Medication').
See also 'Entry Requirements - Medication' on the website of the Foreign & Commonwealth Office. (It's worth reading ALL of the information on the page anyway):
http://www.fco.gov.uk.../united-arab-emirates
Be VERY careful about taking even prescribed medication into Dubai .
Make certain you have only as much as is nessesary and that you have a doctors official letter stating that you need the medication and a copy of the prescription. As you have been told anything that has Codeine or any Opiate drug is banned even on prescription. There is a possible death sentence for breaking the drug laws in Dubai even if it is by accident . You have been warned !