Much depends on the size of the company, who you get to speak to, and if you walk in at the right time....And, what it is that you are actually handing to them....A business card by itself is not much.
I think it's always better to call, find out who it is that you should speak to, and see if you can get an appointment with them.
Though,...I've done it myself...There have been times that I was passing by a company, and I decided to take a chance and drop in on them.
Your biggest problem is if you are simply handing the card (or even a brochure) to someone at a reception desk. There's a good chance they haven't got a clue who to pass it along to in the company...And, that is why it is better for you to know who it should go to in the company.
With a smaller business you could have more success...I have had occasions in which someone did have the time to speak with me...But, the larger the company, the less of a chance of this occuring.
All in all. I think that rather than simply handing out business cards, you should have a small brochure or at least a simple letter describing what it is that you are offering.
And, make a call before you drop in...Use your cell phone if you find yourself nearby...And tell them this..."I'm in your area, and I wonder if you have a few moments ....".
I find visiting and meeting people is the most productive (successful) way to generate business. If you are going this route, plot out a route for yourself in the afternoon, call for appointments for the next day, and visit them with a brief pitch. But, at the same time, hand them more than just a business card.
And, if you want to get more done...Use the phone...It's effective.

