Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 July 20th, 2003, 08:32 AM
Registered User
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default DBConcurrencyException while updation of a record.

Hi,

I am having problems with updating a row in the database. The scenario is such --

I am using OleDbProvider (MSAccess as the backend). I have a table where the PK is Auto-generated. e.g. say the Table is Customers and the Auto-generated PK is CustomerCode. Now my update query is like --

update Customers set field1 = @field1, ... where CustomerCode = @custcode

Now after filling all the parameters, when I say dtAdap.Update(ds, "Customers"), I get the DBConcurrencyException ?

Please help me with this.

Thanks and Regards,
Manoj.

 
Old July 24th, 2003, 05:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

Be ensure that the parameter for @custcode (supposed named CustCodeParameter) has appropriate version:
CustCodeParameter.SourceVersion = DataRowVersion.Original

HTH.

...but the Soon is eclipsed by the Moon





Similar Threads
Thread Thread Starter Forum Replies Last Post
help in updation sanjeev jha Classic ASP Basics 0 November 12th, 2007 04:17 AM
photograph updation k.manisha .NET Framework 1.x 0 November 9th, 2006 01:56 AM
DBConcurrencyException hmrupp ADO.NET 0 June 5th, 2004 04:37 AM
updation of datasource abhimca_1 ADO.NET 0 August 5th, 2003 07:23 AM





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