Home All Groups Group Topic Archive Search About

ExecuteDataSet, Reader, non query and...

Author
14 Dec 2006 6:15 AM
Sugandh Jain
Hi,
Could you tell me which of the sql commands execute commands to be used for
best in the situation I am in.

I will call a SP, which will return A SINGLE ROW with the details of the ID,
I pass to it as the Input Parameter.
As in
1. ExecuteReader
2. ExecuteScalar
3. ExecuteDataSet
4. ExecuteNonQuery

I am using latest version of Micrsoft Enterprise Library, Data Access Block.


Thanks & Regards,
Sugandh Jain

Author
14 Dec 2006 7:49 AM
Miha Markic [MVP C#]
And the correct answer is 1.
2. returns you a singe value
3. doesn't exist (ok, it doesn't exist in ado.net but it probably exists in
EL)
4. doesn't return anything

--
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
"Sugandh Jain" <sugandh.j***@nirvana-sol.com> wrote in message
news:uO9LTb0HHHA.4992@TK2MSFTNGP04.phx.gbl...
> Hi,
> Could you tell me which of the sql commands execute commands to be used
> for best in the situation I am in.
>
> I will call a SP, which will return A SINGLE ROW with the details of the
> ID, I pass to it as the Input Parameter.
> As in
> 1. ExecuteReader
> 2. ExecuteScalar
> 3. ExecuteDataSet
> 4. ExecuteNonQuery
>
> I am using latest version of Micrsoft Enterprise Library, Data Access
> Block.
>
>
> Thanks & Regards,
> Sugandh Jain
>

AddThis Social Bookmark Button