Stored Procedure expects parameter ??? which was not supplied

I have a VB.Net windows app that call a SP. The message I'm getting (which is the title of this thread) I know that this error is misleading because the parameter does exist in every location that it is supposed to be in. My thought though is that the value I'm passing from the field in question contains NULL...could that be the cause of this error?
BlakeMcKennaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
you need to pass all the parameters, even if is null
Alternative option will be to alter the stored procedure to make some of the parameters null (just add   = null  after the input variable ), then you can specify the input parameter and its value when calling the sp thru your application
0
BlakeMcKennaAuthor Commented:
I was thinking about changing the SP. Is it like this?

@variable                          INT, NULL
0
Aneesh RetnakaranDatabase AdministratorCommented:
No

@variable                          INT = NULL,

specify explicit parameters while calling the sp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BlakeMcKennaAuthor Commented:
That worked great. Wish I would have known about that little trick...

Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.