>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