Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     

Share This Page