The other day while working on an ASP.Net website with some simple ADO.Net CRUD functionality, I was getting the most frustrating error.
"Line 1: Invalid syntax near 'spMyProcedureName'." But I ran the stored procedure in Query Analyzer, and it worked fine.
Typically my response is to go to the web, but a search on the error message turned up only people with the same question - and no answers that worked for my situation.
After much searching through code, and admittedly some yelling, it finally came to me what the problem was: I had not set the command type to 'StoredProcedure' on the command object.
Dang literal computers.