Multiple Threads in C# for save

Last post 07-03-2009 3:17 PM by JeffreyABecker. 2 replies.

Sort Posts:

  • Multiple Threads in C# for save

    07-02-2009, 5:38 AM
    • Member
      38 point Member
    • ashok.k
    • Member since 02-02-2009, 12:23 PM
    • Posts 117

     Hi

      I am working on .NET 3.5 application. I have to pass 4 0r 5 XMLs from UI to the stored procedure and save.

    I am reading the XML in Stored procedure and doing Insert/Update operations. Now i am saving them one by one.


    Is is possible to use threading to Pass all the 5 XMLs  to the Proc and save them parallely?

    That is Create a new Thread  -- > Start saving 1 st XML  -- > Continue executing Parent  Thread without waiting for response.

     

    Thanks
    Ashok

  • Re: Multiple Threads in C# for save

    07-02-2009, 9:31 AM
    Answer
    • Contributor
      5,138 point Contributor
    • papabear
    • Member since 08-08-2005, 3:49 PM
    • Posts 851

    I would think the best way to do that would be to call a webservice. Each call will spin up its own Session, and you can do it asynch...

    ;)

    give me suggestions for what to blog... http://www.myfriedmind.com/techblog -> thx

    Mark as "Answered" if this solves that wee old problem...
  • Re: Multiple Threads in C# for save

    07-03-2009, 3:17 PM
    Answer
    • Star
      14,226 point Star
    • JeffreyABecker
    • Member since 10-04-2004, 4:27 AM
    • Philadelphia, PA
    • Posts 2,909

    Using the ThreadPool class will save you a ton of code.

Page 1 of 1 (3 items)