ExecuteDataSet, Reader, non query and...

S

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
 
M

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
 

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