Fetching Data into Your Application
You load data into your application by executing TableAdapter queries, or by calling the Fill method of a data adapter. You execute SQL statements and stored procedures by calling TableAdapter queries, or by executing methods on Command objects. The following topics describe how to fetch data and how to execute SQL statements and stored procedures.
In This Section
- Filling Datasets and Querying Data Overview
-
Describes how to load data into datasets, and how to execute stored procedures, and execute queries against a database.
- How to: Fill a Dataset with Data
-
Provides details for loading data into datasets using TableAdapters and DataAdapters.
- How to: Create and Execute an SQL Statement that Returns Rows
-
Provides details for creating and executing SQL statements that return rows using TableAdapter queries and Command objects.
- How to: Create and Execute an SQL Statement that Returns a Single Value
-
Provides details for creating and executing SQL statements that return single values using TableAdapter queries and Command objects.
- How to: Create and Execute an SQL Statement that Returns No Value
-
Provides details for creating and executing SQL statements that return no value using TableAdapter queries and Command objects.
- How to: Execute a Stored Procedure that Returns Rows
-
Provides details for executing stored procedures that return rows using TableAdapter queries and Command objects.
- How to: Execute a Stored Procedure that Returns a Single Value
-
Provides details for executing stored procedures that return single values using TableAdapter queries and Command objects.
- How to: Execute a Stored Procedure that Returns No Value
-
Provides details for executing stored procedures that return no value using TableAdapter queries and Command objects.
- How to: Set and Get Parameters for Command Objects
-
Provides details for assigning values to parameters in queries and stored procedures, and reading values in parameters returned from executed commands.
- Walkthrough: Filling a Dataset with Data
-
Provides details for creating a dataset and populating it with data from a database.
- Walkthrough: Reading XML Data into a Dataset
-
Provides details for creating a Windows application that loads XML data into a dataset and then displays the dataset in a DataGridView control.
Reference
- DataSet
-
Represents an in-memory cache of data.
- DataTable
-
Represents one table of in-memory data.
- DataRow
-
Represents a row of data in a DataTable.
- SqlCommand
-
Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database.
- OleDbCommand
-
Represents an SQL statement or stored procedure to execute against a data source.
- OracleCommand
-
Represents an SQL statement or stored procedure to execute against an Oracle database.
- OdbcCommand
-
Represents an SQL statement or stored procedure to execute against a data source.