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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top