Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6132959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:10:00+00:00 2026-05-23T17:10:00+00:00

I have written this code which accesses the Delete method on Web Service x,

  • 0

I have written this code which accesses the Delete method on Web Service x, I will be creating wrappers for each of the methods but I am hitting a blocker on something probably very simple.

My code consists of three methods:

  • One to make the delete call, this simply passes the params to an Async method.
  • The second is the event handler.
  • The third processes the results into a data table

Here is my current code:

public void Delete(string[] Identifiers, string ObjectType)
{
    service.deleteAsync(ObjectType, Identifiers);
    service.deleteCompleted += new deleteCompletedEventHandler(service_deleteCompleted);
}

void service_deleteCompleted(object sender, deleteCompletedEventArgs e)
{
    StoreResults(e.Result);
    if (resultsTable.Rows.Count == totalRecords)
    {
        CSVFile myFile = new CSVFile(",", true);
        myFile.Save(resultsTable, outputPath);
        Console.WriteLine("Tasks completed");
    }
}

public void StoreResults(DeleteResult[] ResultSet)
{
    if (resultsTable.Columns.Count < 1)
    {
        resultsTable.Columns.Add("ID");
        resultsTable.Columns.Add("Errors");
        resultsTable.Columns.Add("Success");
    }

    foreach (DeleteResult r in ResultSet)
    {
        StringBuilder errors = new StringBuilder();
        object[] newRow = new object[3];

        newRow[0] = r.id;
        if (r.errors != null)
        {
            newRow[1] = errors[0].ToString();
        }
        else
            newRow[1] = "No Errors to Report";

        newRow[2] = r.success.ToString();

        resultsTable.Rows.Add(newRow);
    }
}

A restriction of the webservice is that I can only pass 50 ID’s per call, so I have some background code which manages the chunking of source data, what I need to acheive now is to store all of those results in a data table and pass it back.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:10:01+00:00Added an answer on May 23, 2026 at 5:10 pm

    You have to subscribe first:

    public void Delete(string[] Identifiers, string ObjectType)
    {
        service.deleteCompleted += service_deleteCompleted;
        service.deleteAsync(ObjectType, Identifiers);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a php code which will get one id from database and
I have written a Windows service that spawns a separate process. This process creates
I am creating my own jQuery plugin. Here is the code which I have
I have written this code but it doesn't compute ((((bY - aY) / (maxX
I have written a piece of a code which is supposed to read the
Hi I have written this code that with output you can get that .remove()
I have written code which saves a user's answers as well as a recorded
I have written a java annotation that looks like this: @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) // can
I have always written regexes like this <A HREF=([^]*) TARGET=_blank>([^<]*)</A> but I just learned
This is what I have written: if ((lstProperty[i].PropertyIdentifier as string).CompareTo(Name) == 0) Resharper put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.