I\'m getting the following error when calling a stored procedure:
Cannot find the object \"XXX\" because it does not exist or you do not have permission.
I\'
Similar to marked answer: The final line of my stored procedure was a line which granted permission to the stored procedure to run as the appropriate user - probably added there when I generated a script.
Removing that (or perhaps a hidden character attached) managed to fix it.
"XXX" was the name of the stored procedure I called, successfully (it made the desired change) but which gave me this error.