I am trying to execute a stored procedure from a VB6 application - get an error message telling me thta execute permission is denied.
Have read elsewhere on this site that I need to grant the user EXECUTE permission using a statement
GRANT EXECUTE ON <<stored procedure name>> TO <<username>>
Do I put this statement in the stored procedure itself or does it have to go elsewhere.
----- stored procedure --------
CREATE PROCEDURE dbo.sp_FreeIssueParts
exec master..xp_cmdshell 'DTSRun /S (local) /U sa /P mbl1175 /N dtsFreeIssue', NO_OUTPUT
------ connection from application -------
Set dbBookIn = New Connection
dbBookIn.CursorLocation = adUseClient
I believe the staement I need is:
GRANT EXECUTE ON [dbo].[sp_FreeIssueParts] TO anodising
- but where does it go?