Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server - granting permissions on SP's
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00445147
Message ID:
00445167
Views:
12
>At my application i have code to create my stored procedure on the server. I use SQLEXEC() to send that string.
>
>I've add "GRANT EXECUTE ON myStoredProc TO PUBLIC" to that string.
>It doesn't give any error, but the truth is that it doesn't give access to public.
>
>If i use that GRANT permission instrution at Query Analyser, everything is OK.
>
>Any idea?

Send your stored procedure, then the GRANT command, but not in the same SQLEXEC(). My guess is that the GRANT command has become part of the stored procedure.
cSP = "CREATE PROCEDURE p_Something AS ..."
IF SQLEXEC(nConn, cSP) > 0
    SQLEXEC(nConn, "GRANT EXEC ON p_Something TO PUBLIC")
ENDIF
Sylvain Demers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform