Default stored proc parameters?

  • Thread starter Thread starter Sean
  • Start date Start date
Hi all,

In VB.NET you can use default parameters to stored procedures using
the Nothing keyword, as described in:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q321902

I used to use the default keyword in old ASP.

How do I do this in C#?
I want to use the default parameter, and not pass null.

TIA,

Sean.

If the SP has a default value, you don't have to pass the parameter at
all. Just don't add it to the parameter list of the SqlCommand
object.

Jonathan Schafer
 
Back
Top