473,414 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

concurrency violation error

I got a simple form and using databinding manager to do the add new
Now , my big trobule is . I can update the 'addnew' record, However, after I
new the record, and then amend it , it got concurrency violation error, (I
can solve it but I need to clear the dataset and fill in again, and I think
it is not the solution)
Please help

--
..
Nov 21 '05 #1
2 2533
I should post my code here:-
I am using Databinding manager to bind the textbox in the form.
'New
bmInvoice.endcurrent()
bmInvoice.addnew()
'Save...
if dsInvoice.haschanges() then
daInvoice.update(dsInvoice,"invoicetable")
dsInvoice.update()
end if

'Modify
bmInvoice.endcurrent()
'Save.....
if dsInvoice.haschanges() then
daInvoice.update(dsInvoice,"invoicetable")
dsInvoice.update()
end if

Now , I can save the record (in new mode) , however, once I modify it
immedately and then save, I got 'concurrency violation ; update command
affect 0 records' ?
Please help

--
..
"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:OL**************@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
I got a simple form and using databinding manager to do the add new
Now , my big trobule is . I can update the 'addnew' record, However, after I new the record, and then amend it , it got concurrency violation error, (I
can solve it but I need to clear the dataset and fill in again, and I think it is not the solution)
Please help

--
.

Nov 21 '05 #2
Agnes,

I think your code is not needed only to tell if you use "autokey".

Before you think it, that is when you get these problems and I have no
"better" solution than the one you use.

Cor

"Agnes" <ag***@dynamictech.com.hk>

I should post my code here:-
I am using Databinding manager to bind the textbox in the form.
'New
bmInvoice.endcurrent()
bmInvoice.addnew()
'Save...
if dsInvoice.haschanges() then
daInvoice.update(dsInvoice,"invoicetable")
dsInvoice.update()
end if

'Modify
bmInvoice.endcurrent()
'Save.....
if dsInvoice.haschanges() then
daInvoice.update(dsInvoice,"invoicetable")
dsInvoice.update()
end if

Now , I can save the record (in new mode) , however, once I modify it
immedately and then save, I got 'concurrency violation ; update command
affect 0 records' ?
Please help

--
.
"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:OL**************@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
I got a simple form and using databinding manager to do the add new
Now , my big trobule is . I can update the 'addnew' record, However,
after

I
new the record, and then amend it , it got concurrency violation error,
(I
can solve it but I need to clear the dataset and fill in again, and I

think
it is not the solution)
Please help

--
.


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Billy Jacobs | last post by:
I have a client who is getting a concurrency violation error whenever she tries to update a record. I can log in to the site as her simultaneously and update the record with no problem. I can...
3
by: Suzanne | last post by:
Hi All I'm having problems getting my data adapter to throw a concurrency exception with an INSERT command. I want to throw a concurrency exception if an attempt is made to enter a row into...
25
by: nick | last post by:
I'm having trouble updating from a datagrid. It's says "Concurrency violation: the UpdateCommand affected 0 records", though I can't see how it's related to "concurrency". I can insert and delete...
2
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
2
by: Vladimir O¾ura | last post by:
I am building a pocket pc application that requires a datagrid. I am inserting a new row this way: private void mInsert_Click(object sender, System.EventArgs e) { try { DataRow dr =...
4
by: Jerry | last post by:
Hi, I have an app which retrieves data from a sql server table and displays it on a datagrid. If 2 sessions of this app are running and 2 users try to update the same record at about the same...
2
by: BobAchgill | last post by:
Do you know why this error might be happening? Maybe it is because I have two data adapters open on the same MDB file?? If this is the problem... how can I keep them from disturbing each other?...
5
by: Vayse | last post by:
In my save code, most of items save fine. But sometimes I get a concurrency violation message. "Concurrency violation: the UpdateCommand affected 0 of the expected 1 records." It happens on the...
2
by: John | last post by:
Hi During db development one of the most frustrating thing is the Concurrency Violation error which seems to be a general error message for any error during saving of record(s). How can one...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.