The Temple of Fu

code, systems and games

Archive for the ‘Visual Studio’ Category

Procedure or function X expects parameter Y, which was not supplied.

with 3 comments

I have been tracking down the source of this error for about an hour and a half.

“Procedure or function ‘procedure name’ expects parameter ‘@parameter_name’, which was not supplied.”

This is happening when I call a stored procedure with parameters through .Net’s data connection to SQL (System.data.SqlClient) and also through a WCF client proxy. The only way I was even able to see that error was via SQL Profiler and by executing the code it captured but that’s because we do not have good logging setup on our WCF endpoints yet. After much pain and debugging I found that it was because I forgot to add (or accidentally removed) a critical piece when setting this up, so yes it all comes down to user ID10T error but isn’t it always.

m_cmd.CommandType = CommandType.StoredProcedure

Hope this helps someone, off to refill my coffee cup!

Written by lordfu

August 30, 2012 at 9:52 am

Visual Studio – Method Auto Comment (XML Documentation) Not Working

with one comment

Opened up a project that was started by a fellow developer at work, I got_set_to_write_code and wanted to do what all good developers do, they comment their code! 🙂
I needed to add a method comment which can be triggered by typing three ticks ”’. It stubs out

But it didn’t work, grrr. The fix:
1. Go into project properties
2. Select the Compile tab.
3. Check ‘Generate XML documentation file’

Now the auto comment shortcut should work.

Written by lordfu

July 31, 2012 at 10:33 am