Re: EXECUTE permission denied on object... uh?
From: Cowboy \(Gregory A. Beamer\) [MVP] (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 07/07/04
- Next message: Cowboy \(Gregory A. Beamer\) [MVP]: "Re: Getting Control ID of buttons in Buttoncolumn in a Datagrid"
- Previous message: Cowboy \(Gregory A. Beamer\) [MVP]: "Re: how can i write in a database"
- In reply to: Jiggaz: "EXECUTE permission denied on object... uh?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 7 Jul 2004 07:43:21 -0500
Open Enterprise Manager for SQL Server. Right click on the stored procedure
in question. Make sure the user in your conn string is allowed to EXECUTE
the proc.
NOTE: If you are using integrated security, you will have to have the
Windows group, with this user account (yours?) as the group that has EXECUTE
rights.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"Jiggaz" <anonymous@discussions.microsoft.com> wrote in message
news:28b1c01c46419$6faff8e0$a301280a@phx.gbl...
Hi,
In my ASPX Page, i have a form for signup. And whene user
click on the button, the event Button1_Click must use a
stored procedure.
But instead of use stored proc, i get this exception :
_____
System.Data.SqlClient.SqlException: EXECUTE permission
denied on object 'CreateAccount', database 'wizou', schema
'dbo'. at
System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, TdsParserState state) at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, TdsParserState state) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjec
t
stateObj) at
System.Data.SqlClient.TdsParser.Run(RunBehavior
runBehavior, SqlCommand cmdHandler, SqlDataReader
dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj) at
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, RunBehavior runBehavior, String resetOptionsString) at
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream,
String method, DbAsyncResult result) at
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
result) at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at
Signup.Button1_Click(Object sender, EventArgs e) in
c:\Inetpub\wwwroot\wizou\Signup.aspx.cs:line 114
_____
AND MY CODE IS :
SqlCommand myCommand = new SqlCommand();
String strCnx =
ConfigurationSettings.ConnectionStrings["AppCnxStr"].ConnectionString.ToStri
ng();
myCommand.Connection = new SqlConnection(strCnx);
myCommand.Connection.Open();
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.CommandText = "CreateAccount";
SqlParameter myNickname = new SqlParameter("@Nickname",
SqlDbType.NVarChar, 30);
myNickname.Value = boxLogin.Text;
myCommand.Parameters.Add(myNickname);
SqlParameter myPassword = new SqlParameter("@Password",
SqlDbType.NVarChar, 15);
myPassword.Value = boxPwd.Text;
myCommand.Parameters.Add(myPassword);
...
myCommand.ExecuteNonQuery();
System.Web.Security.FormsAuthentication.SetAuthCookie(boxLogin.Text,
true);
Response.Redirect("/Signup.aspx?action=Complete");
_______________________
Regards.
- Next message: Cowboy \(Gregory A. Beamer\) [MVP]: "Re: Getting Control ID of buttons in Buttoncolumn in a Datagrid"
- Previous message: Cowboy \(Gregory A. Beamer\) [MVP]: "Re: how can i write in a database"
- In reply to: Jiggaz: "EXECUTE permission denied on object... uh?"
- Messages sorted by: [ date ] [ thread ]