disconnected DataSet multi-threading question

Discussion in 'ASP .Net' started by Alina, Jul 16, 2003.

  1. Alina

    Alina Guest

    Hello

    I'm working with a disconnected DataSet and I wish to make thread-safe the
    "add new rows" method.
    I try like this, but does not work:

    public class MyXmlDataDoc
    {
    .....
    System.Threading.Mutex m = null;
    m = new System.Threading.Mutex(false, "NoPassingAdd2");
    m.WaitOne();

    this.DataSet.EnforceConstraints = false;
    //add rows throgh the xml methods...
    this.DataSet.EnforceConstraints = true;

    m.ReleaseMutex();
    .....
    }

    Could somebody give me a hit or an example how to do it (multi-threading)?
    I do not wish to put a lock.

    Thank you
     
    Alina, Jul 16, 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. Justin Dutoit

    Re: Sorting on a disconnected dataset

    Justin Dutoit, Aug 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    600
  2. Replies:
    1
    Views:
    1,482
    Robbe Morris [C# MVP]
    Jun 26, 2006
  3. Replies:
    38
    Views:
    1,323
    Dennis Lee Bieber
    Feb 15, 2005
  4. Replies:
    1
    Views:
    355
  5. akineko
    Replies:
    3
    Views:
    2,735
    Jesse Noller
    Jan 29, 2009
Loading...

Share This Page