Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 13th, 2004, 08:33 PM
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Concurrency Violation performing Database updates

We are inserting a new record in the datasource, setting new identity. We capture data fields in the dataset with that identity as key. Push back to original record, but adds two records, rather than updating first record. We get a concurrency violation if we accept changes after the insert. We are brand new at VB.Net.

 
Old February 15th, 2004, 01:51 PM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!
it is very unclear what you are trying to do.

from my little experience in concurrency errors,
try this solution to get rid of the error:
add and remove the records from the dataset,
perform update from the data adapter,

and my point is - do AcceptChanges() method at the end only!
hope it helped in any way..






Similar Threads
Thread Thread Starter Forum Replies Last Post
concurrency violation updating child table karenai VB Databases Basics 1 January 27th, 2008 02:29 AM
Concurrency Violation Exception Olorin ADO.NET 10 October 4th, 2007 12:21 PM
Concurrency Violation Problem - Please HELP! Aaron Edwards ASP.NET 2.0 Basics 0 March 25th, 2007 08:17 PM
Concurrency Violation Problem - Please HELP! Aaron Edwards ADO.NET 1 March 25th, 2007 08:15 PM
Lists of All Inserts & Updates Tables in Database Walden SQL Server 2000 1 October 24th, 2003 09:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.