Reputation: 18980
Workflow:
I have two stored procedures. One stored procedure calls the other. When I first open SQL Server Management Studio, the child/nested stored procedure has no output parameters. Nor does my parent/calling stored procedure have an "OUTPUT" keyword on the argument when calling the child/nested stored procedure. And of course I'm not expecting any argument to be returned as output in my parent/calling stored procedure from the child/nested stored procedure.
Then I decided I need the returned value of the id that was inserted during that child/nested stored procedure, so I decided to put an "OUTPUT" keyword onto the parameter so that I can retrieve that value in the parent/calling stored procedure.
So I altered my child/nested stored procedure after adding an "OUTPUT" keyword on the end of the parameter. And clicked the "Execute" button in SQL Server Management Studio to save the stored procedure.
Then I added an "OUTPUT" keyword for the argument of my parent/calling stored procedure that matches up with the parameter of the child/nested stored procedure. Then I clicked the "Execute" button in SQL Server Management Studio to save the stored procedure.
Issue:
I have red underlines under my argument in the parent/calling stored procedure. The tooltip for the error says, "The formal parameter @donorid was not declared as an output parameter, but the actual parameter passed in requested output."
Workaround:
I can easily restart SQL Server Management Studio and it clears the cache and the red underlines go away, but I'd like to know the command that clears it without restarting.
PS: I'll post my stored procedures in separate posts so you have an example to work from.
Upvotes: 1
Views: 908
Reputation: 432511
To update Object Explorer one of:
To update Intellisense: ctrl + shift + R (also under Edit..Intellisense menu)
Upvotes: 1