What’s better: DataSet or DataReader?

That is essentially: “which is better: a bucket or a hose?”

A DataSet is the bucket here; it allows you to carry around a disconnected set of data and work with it – but you will incur the cost of carrying the bucket (so best to keep it to a size you are comfortable with).

A data-reader is the hose: it provides one-way/once-only access to data as it flies past you; you don’t have to carry all of the available water at once, but it needs to be connected to the tap/database.

And in the same way that you can fill a bucket with a hose, you can fill the DataSet with the data-reader.

The point I’m trying to make is that they do different things…

I don’t personally use DataSet very often – but some people love them. I do, however, make use of data-readers for BLOB access etc.

Leave a Comment