string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\path\\to\\your\\database.accdb";
string query = "SELECT * FROM Customers";
OleDbConnection connection = new OleDbConnection(connectionString);
OleDbDataAdapter adapter = new OleDbDataAdapter(query, connection);
DataSet dataSet = new DataSet();
adapter.Fill(dataSet, "Customers");
ReportDataSource reportDataSource = new ReportDataSource("Customers", dataSet.Tables[0]);
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(reportDataSource);
reportViewer1.RefreshReport();
What is the purpose of the ReportDataSource class in the code?
A) To establish a connection to the database.
B) To retrieve data from the database.
C) To create a dataset to hold the data.
D) To provide data to the report viewer.