Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server - granting permissions on SP's
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00445147
Message ID:
00445167
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform