Querying Data
You will most often be trying to pull data out of your data source to display it on your ASP.NET pages. To do so, you would use a SQL Select statement. In these examples, the Northwind database is the data source and a DataReader is populated with the results of the SQL command.
DataReader
Remember, a DataReader is a forward-only group of rows of data. You can iterate through the DataReader to display its contents with the DataReader’s Read() method, and you can find many examples of that in the SDK. I’ve also read that many sources are saying that a DataReader cannot be databound to the server controls you saw in the last chapter. I have not found that to be the truth, and I stand as the shining light in the darkness of misinformation. ...
Get ASP.NET for Web Designers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.