Don't know where you were, but . . .
. . I've not had much of a problem - our clients know they'll need our services again.
Lawyers and doctors are exceptions. You need to be a law firm yourself to deal safely with lawyers. Doctors pay, they just won't ever call you back because you're "too expensive", and a "one night stand" job is usually not worth the bother. Both professions think anyone but a doctor or a lawyer should be getting minimum wage. We are reluctant to do business with either of these professions.
Certain types of business attract deadbeats. Photography, for instance, but not always. Our fastest paying client ever is a (very prosperous) photography studio.
Essentials
#1 - Always do a written proposal defining exactly what you are going to do and what the client's responsibilities are, right down to "client to supply 2 power outlets on the backboard" sort of stuff.
#2 - Right from the first quote, put in a "terms" paragraph. It's 50% to start, and work begins when that is received. If the client won't do this, they probably don't have the money, so there's no sense in doing the work. Don't be afraid to specify progress billing, especially if the hardware / software part exceeds that 50% up front.
#3 - Ask other business people about collection services. They vary greatly in effectiveness, and a good one can be invaluable. Get one that'll do a warning letter free or for a low fee - If that doesn't do it, expect to lose 30% or more of the due, but 70% is a lot better than nothing. Start collection proceedings early - the fee will be lower and the likelihood of collecting much higher. Collection agencies recommend putting a clause in the quote and on the invoice that collection costs are additional to the invoice amount. We've never done this because we very rarely have to send something to collection.
#4 - Seek clients where there will be plenty of follow-on work. Getting new clients is difficult and expensive. Follow-on work for existing clients is far more profitable.
#5 - Specialize if you can. That way you can train others to do the work. This allows the business to grow. Being a generalist, I've had a lot of trouble with that, so I'm drifting more into specialized work.
#6 - Make sure you are fully qualified to do the work, efficiently and effectively. If you aren't, bring in someone who is, or just hand the job off to someone who is. Everyone will be happier that way, including you.
#7 - Remember that you are a business person first - a techie second - a distant second. If you can't handle that distinction, then you need to get a job.
[link|http://www.aaxnet.com|AAx]