EFileTahi-A Posted December 28, 2004 Posted December 28, 2004 (edited) Possible Update failure. Please Read! Well, at VB6, there was a remote critical failure if more then one person tryed to update / create a record at the same time on an Intranet access database. I was wondering how will C# DataTable handle this when the datatable.update is sent... Will it give me an error message? Does it have a builtin protection? Am asking this because it was realy hard to catch this error in VB6, imagine 3 ppl here at the company trying to press "Return" at the same time with only a few miliseconds of tolorance during a few hours. Tks! Edited December 29, 2004 by EFileTahi-A Quote
EFileTahi-A Posted December 30, 2004 Author Posted December 30, 2004 please, if there is something confusing about this post, let me know about it... Quote
*Experts* Nerseus Posted December 30, 2004 *Experts* Posted December 30, 2004 Offhand, I wouldn't expect a response since you haven't shown us anything that indicates you've looked for this yourself. Maybe it's just me, but if someone wants help, I want them to first indicate that they've tried everything they can think of first. In your case, you've seen this problem before so you probably have a method to duplicate the issue - get 2 or 3 people on your .NET app at the same time, pressing Enter and see what happens. If it were me, I'd be asking a bunch of questions. When did the VB6 app fail - when opening the connection or during the update? What was the error and what generated it (Access, RDO, etc.)? How do you open your connection and how is Access configured - can you have more than one connection at one time? -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
EFileTahi-A Posted January 3, 2005 Author Posted January 3, 2005 Offhand, I wouldn't expect a response since you haven't shown us anything that indicates you've looked for this yourself. Maybe it's just me, but if someone wants help, I want them to first indicate that they've tried everything they can think of first. In your case, you've seen this problem before so you probably have a method to duplicate the issue - get 2 or 3 people on your .NET app at the same time, pressing Enter and see what happens. If it were me, I'd be asking a bunch of questions. When did the VB6 app fail - when opening the connection or during the update? What was the error and what generated it (Access, RDO, etc.)? How do you open your connection and how is Access configured - can you have more than one connection at one time? -ner Well, am not that kind of "pal" that just sits around praying that ppl will aid me. If I was, I would be fired for sure. Anyway, I just wanted a simple response like: "Yes, you might experience that problem as vb6 as well", "No, it does not happen like that in .NET", "I can't tell"... I not asking ppl to find me a solution for this, I just wanted to know how this this issue is handle, since I don't have 3 persons here at my service to try this... kinda alone ya know... If I had 3 persons I would not be posting here. PS: I can't tell how about: "When did the VB6 app fail - when opening the connection or during the update? What was the error and what generated it (Access, RDO, etc.)? How do you open your connection and how is Access configured - can you have more than one connection at one time?" since that project was not made by me, yet, its no available for my hands. But tks for ur answer anyway. Quote
*Experts* Nerseus Posted January 4, 2005 *Experts* Posted January 4, 2005 My suggestion wasn't meant to be harsh - just reality. It's generally going to "sink in" better if you write a bit of test code yourself to see what happens. I can almost guarantee that if someone said "no, that's not expected behavior" that you'll move on, but that it will come up again in a few months. If you write the test program (probably 15 - 20 minutes) you'll never forget it. Also, the answer may vary depending on a LOT of factors, none of which you mentioned. For example, how are you connecting to Access, what mode does Access run in, are you relying on the DataAdapter, does the UpdateCommand use a proc (possible in Access) or dynamic SQL or something else, and more. My guess is someone does know the answer to your question, but didn't answer because answering would involve asking some questions to make sure the response was fairly accurate. Otherwise they could just answer "you'll get an exception thrown", but that may not be true in your case... -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
penfold69 Posted January 5, 2005 Posted January 5, 2005 If you are using a CommandBuilder to generate the SQL statements for an update, then any record changed between a .Fill and an .Update will generate a concurrency exception (DBConcurrencyException) which you can handle yourself. If you are generating the SQL yourself, then you can obviously decide what happens within your SQL statement or prepared statement. Either way, these kind of errors are very easy to trap - the hardest bit is the business logic to recover from them, which you must already have from your VB6 application. B. Quote
EFileTahi-A Posted January 11, 2005 Author Posted January 11, 2005 (edited) If you are using a CommandBuilder to generate the SQL statements for an update, then any record changed between a .Fill and an .Update will generate a concurrency exception (DBConcurrencyException) which you can handle yourself. If you are generating the SQL yourself, then you can obviously decide what happens within your SQL statement or prepared statement. Either way, these kind of errors are very easy to trap - the hardest bit is the business logic to recover from them, which you must already have from your VB6 application. B. Ahhh, this was the answer I was looking for! Thank you very much penfold69. PS: Nerseus, have to tell you the following, and am not being harsh with this. Penfold69 truly contradicts these words of yours... My guess is someone does know the answer to your question, but didn't answer because answering would involve asking some questions to make sure the response was fairly accurate. Otherwise they could just answer "you'll get an exception thrown", but that may not be true in your case... ...by posting a short brief with two critical possibilities as an answer to my questions. Yet, I do think that, if people reads any thread and do not bother to post because it implicates asking questions, it means that these "people" are not truly helpers. These are also the "kind" of persons that post with less words as they can, forcing sometimes the thread's author, "feeding" the same, with aditional questions, questions that could be easely avoided if "these" persons could clarify their first post in first place (or having truly the will of helping). Conclusion: When someone TRULY wants to help someone they help. (like Penfold69 just did it) Hey, am not "Mr. WiseGuy" that is trying to give you a moral lesson, am just sharing with you what I think, my opinion, I can always be wrong though. PS: I also will not deny that I was kind upset with ur first post (only God knows how much I browse the web before posting here), but, yourself said later on that it wasn't your intention to be harsh. By that, am now forced to apologize you for not being that polite, as I missunderstood you. In other words: "No Hard Feelings" m8 :) Kinda regards EFileTahi-A Edited January 11, 2005 by EFileTahi-A Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.