Click here to Skip to main content
15,892,005 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Office Add-in Pin
led mike29-May-08 4:29
led mike29-May-08 4:29 
QuestionHow to transfer large files over network though networkstream ? [modified] Pin
tamour28-May-08 4:43
tamour28-May-08 4:43 
AnswerRe: How to transfer large files over network though networkstream ? Pin
led mike29-May-08 4:26
led mike29-May-08 4:26 
Answer.Net and Document & Imaging Pin
Chrispie12327-May-08 12:16
Chrispie12327-May-08 12:16 
QuestionSocket.Select() timeout error? Pin
invictus327-May-08 11:57
invictus327-May-08 11:57 
AnswerRe: Socket.Select() timeout error? Pin
Colin Angus Mackay27-May-08 13:22
Colin Angus Mackay27-May-08 13:22 
AnswerRe: Socket.Select() timeout error? Pin
led mike28-May-08 4:39
led mike28-May-08 4:39 
QuestionTableAdapter.Update problem Pin
ford8627-May-08 10:46
ford8627-May-08 10:46 
Sorry for the long text...

I'm using a dataset for the link between my application and the MS Access database. The problem I have is with the Update function of the table adapter object. The code is really simple and it works very well except in one situation. Here's the code (generated by dragging from the data source to the windows form):

this.tblRequestBindingSource.EndEdit();
this.tblRequestTableAdapter.Update(this.forms_Work_LogDataSet.tblRequest);

The situation when it doesn't work is very specific and I've tried it on several test applications and it seems to be caused by the dataset. When I create a new record and save right away, everything is fine. Then, if I make a modification to the record and save again, an Concurrency Violation exception is thrown. It only happens on new records. I can save as many times as I wish on already existing records, but not on new records.

Usually, Concurrency violation exception is due to the fact that more than one user is modifying the record, but in that case, only one user is modifying the information. It seems as if the first update didn't "EndEdit" even though it was clearly done if you look at my code. That's not good because when I call the update method of the table adapter, it's trying to update every changes made in that table of the dataset, meaning I can never save changes in the application data unless I restart the application because it's always throwing the exception.

I read many things on bypassing concurrency violation exceptions, and for the dataset, it seemed pretty logical to just remove the "optimistic concurrency" option. It didn't work, because well, that's probably not even the reason why it's throwing that exception.

I was wondering if this problem can be solved, without switching to a disconnected mode. I want a solution or a reason as to why we cannot insert a new record and save more than once without leaving the application. This problem can easily be reproduced by dragging a data source on a form and trying exactly what I wrote that isn't working fine. If someone has a solution for that, I'd really appreciate the help.

BTW, I won't accept "Don't use datasets" as an answer unless there really isn't an other solutions...
AnswerRe: TableAdapter.Update problem Pin
Mike Dimmick28-May-08 5:32
Mike Dimmick28-May-08 5:32 
GeneralRe: TableAdapter.Update problem Pin
ford8628-May-08 5:39
ford8628-May-08 5:39 
AnswerRe: TableAdapter.Update problem [modified] Pin
William Ten Broek3-Jun-08 16:12
William Ten Broek3-Jun-08 16:12 
Questionscrolling banner/marquee Pin
Learning26-May-08 3:49
Learning26-May-08 3:49 
AnswerRe: scrolling banner/marquee Pin
Vasudevan Deepak Kumar26-May-08 19:19
Vasudevan Deepak Kumar26-May-08 19:19 
QuestionReading external application field value... Pin
just3ala226-May-08 3:00
just3ala226-May-08 3:00 
AnswerRe: Reading external application field value... Pin
Derek Viljoen27-May-08 18:05
Derek Viljoen27-May-08 18:05 
AnswerRe: Reading external application field value... Pin
Tariq A Karim9-Jun-08 16:52
Tariq A Karim9-Jun-08 16:52 
QuestionIssue debugging the class liabrary Pin
Vipul Mehta26-May-08 2:42
Vipul Mehta26-May-08 2:42 
AnswerRe: Issue debugging the class liabrary Pin
Derek Viljoen27-May-08 18:07
Derek Viljoen27-May-08 18:07 
QuestionError:The request failed with HTTP status 400: Bad Request Pin
AshSah26-May-08 0:25
AshSah26-May-08 0:25 
AnswerRe: Error:The request failed with HTTP status 400: Bad Request Pin
paresh_joe26-May-08 2:55
paresh_joe26-May-08 2:55 
AnswerRe: Error:The request failed with HTTP status 400: Bad Request Pin
Peter Josefsson Sweden27-May-08 13:52
Peter Josefsson Sweden27-May-08 13:52 
AnswerRe: Error:The request failed with HTTP status 400: Bad Request Pin
Peter Josefsson Sweden27-May-08 13:54
Peter Josefsson Sweden27-May-08 13:54 
QuestionHow to determine vs 2005 sp1 is installed Pin
Mekong River26-May-08 0:18
Mekong River26-May-08 0:18 
AnswerRe: How to determine vs 2005 sp1 is installed Pin
Laddie26-May-08 1:48
Laddie26-May-08 1:48 
GeneralRe: How to determine vs 2005 sp1 is installed Pin
Mekong River26-May-08 15:28
Mekong River26-May-08 15:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.