asp.net.ph

Skip Navigation LinksHome > Data Access in Web Forms > Selecting Information From a Database

Selecting Information From a Database


In Displaying Information From a Database, we demonstrated samples of using ASP.NET server controls to display the results of database queries, and in brief covered how to bind list control items to a data source.

The samples presented indeed have their uses, particularly when the queries are known beforehand.

In many scenarios, though, you will need to retrieve and display specific data sets based on variable query constraints.

This document briefly steps through code examples that demonstrate dynamic queries in action, where the user decides on which records to display.

The methods described are particularly suitable when the query conditions are initially unknown.

dynamic_query_sql.aspx
Run Sample | View Source
dynamic_query_oledb.aspx
Run Sample | View Source

The material covered in this section assumes some familiarity with database fundamentals and the Structured Query Language ( SQL ). And if you haven’t done so, I suggest you start with the ADO.NET Primer.

Now let’s take a closer look at how all these are done.

Next Topic

Retrieving Data From User Specified Queries



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note