Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

VS.NET 2003, ADO.NET 1.1 and Access 2000: Getting a Concurrency violation

Discussion in 'Information Technology' started by Rod, Jul 28, 2006.

  1. Rod

    Expand Collapse

    I have written a Visual Studio .NET 2003 app, using ADO.NET to retrieve
    several hundred records out of an Access 2000 database, and putting them all
    into a DataSet. Then my app goes against a SQL Server 2000 database,
    retrieves other data and updates about 500 records in the DataSet. I am
    only interested in updating about 50 of the columns in each row (there are
    about 150 columns in the table), I decided to write my own update command
    and associate it with the OleDbDataAdapter that I use to retrieve the
    original table from the Access database. And I also thought I would
    determine how many records there are to update, before I retrieve anything
    from SQL Server.

    When I run my app, it gives me an error that says, "Concurrency violation:
    the UpdateCommand affected 0 records."

    However, I have also discovered that this error message isn't exactly true.
    It has, in fact, updated 1 record. It does that each time I run the app, as
    the total count of records needing updating is 1 less each time I run this.
    So, my guess is that it is updating the first record and then something
    stops it from updating anything more.

    I have experimented, to a small degree, with isolation level, but Access
    doesn't support much, along those lines.

    So, what am I doing wrong, and what could I do to make it possible for the
    app to submit all 500 records, rather than having me run my application 500

  2. Loading...

    Similar Threads Forum Date
    Controversial Appeal to Adopt Nanakshahi 2003 Hard Talk May 23, 2011
    India All spectrum decisions since 2003-08 were wrong: Telecom Panel Breaking News Feb 5, 2011
    Professor Darshan Singh: RSS Wanted Nanakshai Calendar Changes in 2003 Hard Talk Jan 6, 2010
    Sikh News 2003 shooting of Sikh unsolved (The Arizona Republic) Breaking News Jul 11, 2006
    Jap Ji Sahib shoodh paath guide 2003 USA Sikh Sikhi Sikhism Oct 26, 2005

Share This Page