If you're interested in a woman and make it known so and she replies with the "I have boyfriend" clause, all you have to do as a man is jump right over it like a hurdle and tell her: "I'm not interested in him. I'm interested in you!".
Stick to your guns. Focus on your goal.
If indeed she has a boyfreind, you as a suitor have no idea of what that relationship dynamic is. He could be lame, she could be feeling ignored, she could have lost interest, she could be in a rut and needs affirmation of her femininity. She'll just hold out and be coy until she feels assured of how interested you really are before she lets you in the door. So, if you are really attracted to her, stick to it to the final step and get your desired answer.
I can't tell you how many women finally gave in after my subtle but persistent advances. Granted, there is also plenty of women who do have spouses and wanted nothing to do with me. It makes total sense. Again, you don't know that until you follow it through.
Always take it through to its last possible conclusion. Quite often, women themselves don't know what they want and when faced with a clear and interesting option will often give in to it. The female psyche is based on emotion, not logic.