Default stored proc parameters?

J

Jonathan Schafer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top