By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,332 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,332 IT Pros & Developers. It's quick & easy.

Default stored proc parameters?

P: n/a
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...;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.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 8 Jul 2003 10:39:09 -0700, st****@chipeservices.com (Sean) wrote:
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...;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
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.