Home All Groups Group Topic Archive Search About

How to find out records number affected?

Author
30 Jan 2007 9:34 AM
Ivan Abramov
Which was updated by the sql UPDATE instruction.
Is there some objects returning the number
or I have to do explicit SELECT nevertheless?

Thanks in advance.

Author
30 Jan 2007 9:41 AM
Andrea Caldarone
Ivan Abramov wrote:
> Which was updated by the sql UPDATE instruction.
> Is there some objects returning the number
> or I have to do explicit SELECT nevertheless?
>
> Thanks in advance.

the Update method itself return the "Rows Affected"...
Author
30 Jan 2007 9:57 AM
Ivan Abramov
Method of which object?
Author
30 Jan 2007 10:02 AM
Miha Markic [MVP C#]
How do you invoke UPDATE in first place?
Take note that DbCommand.ExecuteNonQuery returns affected rows count.

--
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
"Ivan Abramov" <IvanAbra***@discussions.microsoft.com> wrote in message
news:B9991F2A-E414-4958-9443-A07AFAD47DF3@microsoft.com...
> Which was updated by the sql UPDATE instruction.
> Is there some objects returning the number
> or I have to do explicit SELECT nevertheless?
>
> Thanks in advance.

AddThis Social Bookmark Button