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
[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