Quickest,effective way of fetching data

D

drewdr

Let's say I need to get one single value to work with- the balance
column of a certain userid.

Do I have to fill a dataset from a select query, and then find the
appropriate cell in the dataset ?

Or is there some quicker/better way ?
 
G

Guest

Take a look at IDbCommand.ExecuteScalar method - it returns a single value
from in one call.
 
E

Eliyahu Goldin

And use a datareader (SqlDataReader if you are with Sql Server).

Eliyahu
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top