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. Advertising

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. D
    Replies:
    0
    Views:
    203
  2. Michael Coughlin

    web service delete row WebMethod ?

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

    Overriding Serialize() for web service/WebMethod()

    Mazen S. Alzogbi, Dec 15, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    185
    Mazen S. Alzogbi
    Dec 15, 2003
  4. Ana Lindt
    Replies:
    1
    Views:
    124
    Ana Lindt
    May 31, 2004
  5. j_ruez

    Use Web Service without WebMethod call

    j_ruez, Oct 5, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    126
    j_ruez
    Oct 5, 2005
Loading...

Share This Page