Home All Groups Group Topic Archive Search About

Database Update using dataset

Author
6 Feb 2007 4:02 AM
San
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

Author
6 Feb 2007 9:58 AM
Miha Markic [MVP C#]
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/

Show quote
"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
Author
6 Feb 2007 2:56 PM
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

Show quote
"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
>
Author
8 Feb 2007 6:06 AM
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

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

AddThis Social Bookmark Button