views:

364

answers:

3

I'm guessing Visual Studio is bugging out on me. I changed the stored procedure the a TableAdapter query uses and now the users keep getting the following error.

Procedure or function 'usp_GetEventNotificationSubscribers' expects parameter '@FacilityCode', which was not supplied.

Nowhere in the application is 'usp_GetEventNotificationSubscribers' written.

I can't reproduce the error on my local machine. When I run it locally or step through it in debug mode everything works fine. It even works for me in production. But I keep getting them auto-emailed to me whenever it happens, which is about 3 a day.

A: 

Is the proc being referenced from another proc in the database? If this is so, you won't find the string in your application source code.

try this:

SELECT * FROM SYS.Comments WHERE text LIKE '%GetEventNotificationSubscribers%'

Noel Kennedy
I checked its dependencies and it had none within SQLSERVER.
Slim
btw, it didn't used to be possible to rely on dependencies reported by sql server, might have been fixed, not sure.grabbing at straws here, but could it be an old version of your application, that needs to be updated?
Noel Kennedy
#Noel- I think your grasp at straws led me in the right direction. I have an extra virtual directory where I deploy this app for testing. I believe the user was sent the wrong link. I am denying access to everyone on the test virtual directory and seeing if we get any calls.
Slim
A: 

Is the stored procedure different (e.g. with different parameters) at the production site? It might be that the proc was updated/altered there and locally at your dev environment you're working with a different procedure. This error seems to suggest that the proc in the sqlserver db at the production site has more parameters than the one at your development database.

Frans Bouma
The new sproc has the the same parameter types one has a different name. I change @FaciltiyID to @FacilityCode.
Slim
A: 

A few users where still using the test version of the site. I denied access to everyone on the test virtual directory and the error ceased.

Thanks Noel

Slim