disconnected DataSet multi-threading question

A

Alina

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top