RAD Studio for Microsoft .NET
ContentsIndex
PreviousUpNext
Using the Command Text Editor

In order to create a DataSet, your BdpDataAdapter needs to have at least a SQL Select statement defined for the CommandText property. This statement, once built, appears as the CommandText of the BdpCommand object for the BdpDataAdapter. You can enter this Select statement manually, or you can use the Command Text Editor to construct the statement, along with Update, Insert, and Delete statements, using a simple point-and-click mechanism. Using this method, once you have a connection to a live data source, you will be able to see the names of tables and columns in the Command Text Editor. You can pick from listboxes to build the statement. Also, if you create your BdpDataAdapter using the Data Explorer and a live connection to a data source, a boilerplate Select statement is created for you in the form select * from tablename. You can use this statement to return all rows from the named data source, or you can modify the statement prior to generating the DataSet.

To generate the commands

  1. Select a connection from the Connection drop-down list box. This must be a BdpConnection you have already defined. Your associated BdpDataAdapter object must also be defined and must have the DataSet Active property set to True. This populates the Tables and Columns list boxes with data from the database.
  2. Select a table from the Tables list box.
  3. Select each column that you want to appear in your SQL statements. As you select the column names, they appear in the SQL text box.
  4. Select the check box next to each statement type you want to generate.
  5. Click the Generate SQL button.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!