'Line 1: Invalid syntax near' in ASP.Net
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.
New Geek in Town
So, I'm the new geek on the block. Slowly but surely I am moving my old posts over to this site. Let me know if there is anything you would like to see me write on: I specialize in SQL and ASP.Net (using C# mainly). Looking forward to lots of feedback! Talk with you soon!

Jeff