Database Update using dataset

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
 
A

Aytaç ÖZAY

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
 
C

Cor Ligthert [MVP]

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
 

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