H
Hanover
In at typical SQL command if I want an optional parameter, I say
"Where ID=@ID or @ID=Null"
This way if I dont pass in a parameter, it will just pull all of the
IDs.
Is there a way to set this up in the text command of a SQLCommand
object in .NET?
I've tried, but it keeps throwing an error that tells me that it
expects the parameter. I have three possible optional parameters..and
I'd hate to do a select for every single combination.
Thanks,
Dan
"Where ID=@ID or @ID=Null"
This way if I dont pass in a parameter, it will just pull all of the
IDs.
Is there a way to set this up in the text command of a SQLCommand
object in .NET?
I've tried, but it keeps throwing an error that tells me that it
expects the parameter. I have three possible optional parameters..and
I'd hate to do a select for every single combination.
Thanks,
Dan