DBConcurrencyException not firing

Discussion in 'ASP .Net' started by niju, Mar 29, 2006.

  1. niju

    niju Guest

    Hi all,
    I am using following code to update database; I am running two
    instances of the application and updating the same record. However,
    DBConcurrencyException doesn't fire. Is there something I am missing
    in the code?

    DataRow[] _err = null;
    DataSet dsGetChanges = _nodeDataSet.GetChanges(DataRowState.Modified);

    if (dsGetChanges != null)
    SqlDataAdapter sqlDA = null;
    sqlDA = _nodeDataAdapter;
    sqlDA.ContinueUpdateOnError = true;
    if (dsGetChanges.HasErrors)
    _err= dsGetChanges.Tables[0].GetErrors();
    catch (DBConcurrencyException ex)
    finally {
    niju, Mar 29, 2006
    1. Advertisements

  2. niju

    Jason Hales Guest

    It might because of your line: sqlDA.ContinueUpdateOnError = true

    As the name suggests it will continue prcoessing updates even if an
    error is encountered during a row update. I guess this also includes
    Jason Hales, Mar 29, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.