Now that you have specified the database and the data to use from the database, you will create a data set to contain the data for your Spread component.
C# |
Copy Code
|
---|---|
// Put user code to initialize the page here.
|
Visual Basic |
Copy Code
|
---|---|
' Put user code to initialize the page here.
|
and type the following code to replace it:
C# |
Copy Code
|
---|---|
DataSet ds; ds = dbDataSet; dbAdapt.Fill(ds); |
Visual Basic |
Copy Code
|
---|---|
Dim ds As DataSet ds = dbDataSet dbAdapt.Fill(ds) |
This fills the data set with the data from the database you specified, using the fields you specified when setting up the OleDbDataAdapter control.