web service delete row WebMethod ?

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 ... not exactly parallel syntax?

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top