Pet peeve acknowledged, and I really don't want to get into a lengthy exchange, especially as mine's probably the reverse, and one eventually needs to decide on how they like their code organized. So I'll close with just one additional post.
Personally, I find SQL code so much harder to read mixed in with regular code, and have encountered plenty of issues by many developers with setting parameter values where there are such things as spaces, commas, semi-colons, etc. in the value.
Also, I still do like the layer it provides which helps decouple the application from the structure of the database. In my case this is important, as there is a real chance I may need to support a second database down the road, and I want to retain the option to more easily use a different database.
On some minor notes, caching may work second time around, but for expensive SQL statements, (and I've known a few in my time), execution plan information will be retained with SP.
And I don't give anyone direct access to the tables of my database, everyone needs to go through SPs, which allows more security, and more flexibility in what happens when they do so.
At times this separation of code allows me to pass stored procedures to someone who's more knowledgeable about SQL then me to have him write a more efficient SP for me, and thus take advantage of specialized knowledge.
I guess, I feel the larger a system, or the more widely the application is likely to be used, the more likely the need is for having SPs.
Des Nolan
ABC Systems, Inc.