Try changing your diet a little by adding: fish, brewer's yeast, eggs, and mushrooms. Also add the supplements: MSM and Biotin. - I would use Jojoba oil for the sores. (It's a natural anti-bacterial)
Have you tried using neosporin?
I agree with jemma116 about going back to the doctor.
Did you see a dermatologist or your primary care physician? If you didn't see a dermatologist, I would suggest seeing one for this type of issue.
It could be that the shampoo is drying your scalp out and exacerbating the dandruff and irritating the sores, preventing healing. I've personally found Head & Shoulders, Nizoral, Selsun Blue, and all those anti-dandruff shampoos to make my scalp worse. At night (since it's a really attractive look, lol), I use olive oil and scalp oil I bought at the salon mixed together and apply it to my scalp all over and give myself a little scalp massage. If I have any bad sores on my scalp (I struggle with compulsive skin picking/dermatillomania, it's been an issue since I was 6 or 7, I didn't realize it wasn't normal until I was in my early 20s and I brought it up to my psychiatrist, but yeah, I know what sores on your scalp are like, it's the only place I pick and I've had many times of 3-4 hour picking "sessions") I use a mix of antibiotic ointment and hydrocortisone (1%) over the counter and rub that in. I put my hair up in a messy bun and sleep with that on it. Wash it out in the morning with a creme conditioning shampoo (I use Elasta Qp Creme Conditioning Shampoo because it's cheap and awesome), use Moroccanoil on my hair and my hairline, and the rest has nothing to do with my scalp, haha. :)
As long as I keep my fingers out of my hair and off my scalp, I'm good. My scalp is pretty close to fully healed right now and no dandruff.
I'd put some oil on your scalp at night, go back to the doctor, a dermatologist if you can, and see if they can get to the bottom of it. What are the sores like? Do you scratch or pick at your scalp often? Color your hair frequently?
I suggest you go back to your doctor and let him know that what you have been using has not helped. It may be that you should use it more frequently.
There are other shampoos like Nizorel, or your doctor could prescribe you with something different.
For the dandruff flakes you could try rubbing some baby oil into your scalp and leave it on for a while before washing it off with a gentle shampoo.
It may be that whatever you were using before may have irritated your scalp.
Best wishes.