concurrency violation error

A

Agnes

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
 
A

Agnes

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
 
C

Cor Ligthert

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top