# Querying a Database with ADO.NET

Querying a Database with ADO.NET: Querying a Database with ADO.NET: an overview, ADO.NET Objects, Full Example.

Updated: November 3, 2026

1. [Querying a Database with ADO.NET: an overview](https://www.ask-codey.com/lessons/querying-a-database-with-ado-net-an-overview) (Journeyman): Every database query from C# takes three steps, connect, run the SQL, read the results, and each step has its own ADO.NET object.
2. [ADO.NET Objects](https://www.ask-codey.com/lessons/querying-a-database-with-ado-net-ado-net-objects) (Journeyman): Use SqlConnection to connect, SqlCommand to run SQL, and SqlDataReader to read rows, choosing ExecuteReader, ExecuteScalar or ExecuteNonQuery for each kind of statement.
3. [Full Example](https://www.ask-codey.com/lessons/querying-a-database-with-ado-net-full-example) (Journeyman): A complete console program that reads the connection string from appsettings.json, queries Northwind's categories, and prints a report.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/querying-a-database-with-ado-net
