RAD Studio (Common)
|
Use the editor to create SQL statements for updating a dataset.
The TIBUpdateSQL object must be associated with a TIBQuery object by setting the TIBQuery property UpdateObject to the name of the TIBUpdateSQL object used to contain the SQL statements. A datasource and database name must be selected for the TIBQuery object. In addition, the SQL property must include an SQL statement defining a table.
To open the SQL editor:
The Options page is visible when you first invoke the editor.
Table Name |
Use the Table Name combo box to select the table to update. When you specify a table name, the Key Fields and Update Fields list boxes are populated with available columns. |
Key Fields |
The Key Fields list box is used to specify the columns to use as keys during the update. Generally the columns you specify here should correspond to an existing index. |
Update Fields |
The Update Fields list box indicates which columns should be updated. When you first specify a table, all columns in the Update Fields list box are selected for inclusion. You can multi-select fields as desired. |
Get Table Fields |
Read the table fields for the table name entered and list the fields. |
Dataset Defaults |
Use this button to restore the default values of the associated dataset. This will cause all fields in the Key Fields list and the Update Fields list to be selected and the table name to be restored. |
Select Primary Keys |
Click the Primary Key button to select key fields based on the primary index for a table. |
Generate SQL |
After you specify a table, select key columns, and select update columns, click the Generate SQL button to generate the preliminary SQL statements to associate with the update component's ModifySQL, InsertSQL, DeleteSQL, and RefreshSQL properties. |
Quote Identifiers |
Check the box labeled Quote Field Names to specify that all field names in generated SQL be enclosed by quotation marks. This option is disabled at this time. |
To view, modify, and refresh the generated SQL statements, select the SQL page. If you have generated SQL statements, then when you select this page, the statement for the ModifySQL property is already displayed in the SQL Text memo box. You can edit the statement in the box as desired.
To accept the statements and associate them with the update component's SQL properties, click OK.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|