web service delete row WebMethod

  • Thread starter Michael Coughlin
  • Start date
M

Michael Coughlin

Though I found web service examples for Edit, Get, Cancel & Update, I found none for Delete; so, I'm not sure what would be the proper way to make a delete row [WebMethod] in a web service. Looking at the Update [WebMethod], I thought it might go like this:

[WebMethod]

public dataSetName DeleteName(dataSetName NameDeleteRow)

{

// If there's a row to delete,

if (NameDeleteRow != null)

{

// pass the row-to-delete, as an argument to the dataAdapter.DeleteCommand

dataAdapterName.DeleteCommand(NameDeleteRow);

// However, the dataAdapter.DeleteCommand expects an = SQLcommand.

return NameDeleteRow;

}

else

{

return null;

}

}

Hmmm ??? Why would the dataAdapter.DeleteCommand syntax work differently than the dataAdapter.Update syntax ?

... and how SHOULD the Delete [WebMethod] be done ?

thanks,

Mike
 

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,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top