|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Database Update using datasetHi all,
I want to know What will happen when u try to update db using dataset and record is already deleted in database? Can any one provide info on Knocking concept in .net Thanks & Regards Santhosh I think you'll get concurrency exception.
-- Show quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "San" <S**@discussions.microsoft.com> wrote in message news:736FDA7C-5B8B-425A-AFC4-75C5A9FE6F97@microsoft.com... > Hi all, > > I want to know > What will happen when u try to update db using dataset and record is > already > deleted > in database? > > Can any one provide info on Knocking concept in .net > > Thanks & Regards > Santhosh Yes, Miha is right
You get DbComcurrency Exception. If you don't lock your records you must always use try catch block if you have multiple database users at the same time. Have a nice day, -- Show quoteAytaç ÖZAY MSc. in CSc., MCP, Dynamics AC Technical Consultant Microsoft Academic Software Developer Group Member "Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:9E817C2D-67FE-4DD0-8901-51D2DD92B90A@microsoft.com... >I think you'll get concurrency exception. > > -- > Miha Markic [MVP C#, INETA Country Leader for Slovenia] > RightHand .NET consulting & development www.rthand.com > Blog: http://cs.rthand.com/blogs/blog_with_righthand/ > > "San" <S**@discussions.microsoft.com> wrote in message > news:736FDA7C-5B8B-425A-AFC4-75C5A9FE6F97@microsoft.com... >> Hi all, >> >> I want to know >> What will happen when u try to update db using dataset and record is >> already >> deleted >> in database? >> >> Can any one provide info on Knocking concept in .net >> >> Thanks & Regards >> Santhosh > San,
You have two possibilities. If you have set for the dataadatper update that it should go on by exceptions, there is nothing updated, but the situation is set in the rowerror property of the datarow. Otherwise you get an exception and when you have nothing done to catch that, your program hangs. Cor Show quote "San" <S**@discussions.microsoft.com> schreef in bericht news:736FDA7C-5B8B-425A-AFC4-75C5A9FE6F97@microsoft.com... > Hi all, > > I want to know > What will happen when u try to update db using dataset and record is > already > deleted > in database? > > Can any one provide info on Knocking concept in .net > > Thanks & Regards > Santhosh |
|||||||||||||||||||||||