Database Update using dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,

--
Aytaç ÖZAY
MSc. in CSc., MCP, Dynamics AC Technical Consultant
Microsoft Academic Software Developer Group Member

Miha Markic said:
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 said:
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
 
Back
Top