To generate a Data Set

  1. From the Data Explorer, select a data source.
  2. Drill down in the tree, then drag and drop the name of a table onto your Windows Form or Web Form.

This creates the BdpDataAdapter and BdpConnection for that data source and displays icons for those objects in the Component Tray.

Note: You can also drag a data source only onto the form, rather than a table, but in that case, Delphi 8 for .NET creates only a connection object for you. You must still create and configure the BdpDataAdapter object explicitly.

  1. Click the BdpDataAdapter icon (named bdpDataAdapter1, by default) to select it.
  2. Click the Configure Data Adapter... designer verb in the Designer Verb area at the bottom of the Object Inspector.

This displays the Data Adapter Configuration dialog.

  1. If the SQL statement that is pre-filled on the dialog is acceptable, click the DataSettab, otherwise, modify the SQL statement, then click the DataSet tab.
  2. Select the New DataSet radio button.

Tip: You can accept the default name or change the name of the DataSet.

7. Click OK to generate the DataSet.

A DataSet icon appears in the Component Tray indicating that your DataSet has been created.

Note: By reviewing the code for the DataSet in the Code Editor, you can see that the columns are defined as generic dataColumns, whose columnName properties are assigned the value of the column name from the database table. This differs from how a typed DataSet is constructed, wherein the object name is constructed from the actual database column name, rather than assigned as a property value.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment