Error with executing command object

S

simon

I have dataGrid on my page with edit button.

When user click edit button and change some value and after that click update button, the following code is executed:

oCmd = New SqlCommand("c_MediaType", funkcije.createConnection)
oCmd.CommandType = CommandType.StoredProcedure
oCmd.Parameters.Add("@mediaId", SqlDbType.VarChar, 10).Value = dgdMediaType.DataKeys.Item(e.Item.ItemIndex)
oCmd.Parameters.Add("@aktiven", SqlDbType.Bit).Value = CType(e.Item.Cells(2).Controls(1), CheckBox).Checked
oCmd.ExecuteNonQuery()
oCmd.Connection.Close()
oCmd.Dispose()
dgdMediaType.EditItemIndex = -1
bindDataGrid()

The following error is generated:

EXECUTE permission denied on object 'xp_cmdshell', database 'master', owner 'dbo'.

I don't know why 'xp_cmdshell' is executed here?

Anyway IF I give permission to 'xp_cmdshell' stored procedure than I get the different error:

A severe error occurred on the current command. The results, if any, should be discarded. xpsql.cpp: Error 87 from GetProxyAccount on line 604
I don't know what is happening?

All other pages works fine.

Any idea?

Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top