web service delete row WebMethod

Discussion in 'ASP .Net Datagrid Control' started by Michael Coughlin, Nov 6, 2003.

  1. 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
     
    Michael Coughlin, Nov 6, 2003
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. human
    Replies:
    1
    Views:
    393
    human
    Jul 6, 2003
  2. hocho888
    Replies:
    1
    Views:
    863
  3. D
    Replies:
    0
    Views:
    495
  4. Michael Coughlin

    web service delete row WebMethod ?

    Michael Coughlin, Nov 12, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    196
    Michael Coughlin
    Nov 12, 2003
  5. Mazen S. Alzogbi

    Overriding Serialize() for web service/WebMethod()

    Mazen S. Alzogbi, Dec 15, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    259
    Mazen S. Alzogbi
    Dec 15, 2003
  6. Ana Lindt
    Replies:
    1
    Views:
    187
    Ana Lindt
    May 31, 2004
  7. j_ruez

    Use Web Service without WebMethod call

    j_ruez, Oct 5, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    189
    j_ruez
    Oct 5, 2005
  8. Leo Violette
    Replies:
    0
    Views:
    1,297
    Leo Violette
    Apr 17, 2009
Loading...