Description
Properties for the DataWindow's DBMS connection.
You can also specify stored procedures for update activities. For information, see Table.sqlaction.property.
Applies to
DataWindows
Syntax
PowerBuilder dot notation:
dw_control.Object.DataWindow.Table.property
Describe and Modify argument:
"DataWindow.Table.property { = value }"
Parameter |
Description |
---|---|
property |
A property for the DataWindow's DBMS connection. Properties and appropriate values are listed in the table below. |
value |
The value to be assigned to the property. |
Property for Table |
Value |
---|---|
Arguments |
(Read only) A string containing retrieval argument names and types for the DataWindow. |
CrosstabData |
A string containing a tab-separated list of the expressions used to calculate the values of columns in a crosstab DataWindow. |
Data.Storage |
A string indicating whether table data is to be kept in memory or offloaded to disk. Values are:
Painter: Rows>Retrieve Options>Rows to Disk. |
Delete.Argument |
(Internal use only) A string containing arguments to pass to the delete method. |
Delete.Method |
(Internal use only) The name of the method. |
Delete.Type |
(Internal use only) Currently stored procedure is the only type implemented. |
Filter |
(exp) A string containing the filter for the DataWindow. Filters are expressions that can evaluate to true or false. The Table.Filter property filters the data before it is retrieved. To filter data already in the DataWindow's buffers, use the Filter property or the SetFilter and Filter methods. The filter string can be a quoted DataWindow expression. Painter: Rows>Filter. |
GridColumns |
(Read-only) The grid columns of a DataWindow. |
Insert.Argument |
(Internal use only) A string containing arguments to pass to the insert method. |
Insert.Method |
(Internal use only) The name of the method. |
Insert.Type |
(Internal use only) Currently stored procedure is the only type implemented. |
Procedure |
A string that contains the number of the result set returned by the stored procedure to populate the DataWindow object. You can use this property only if your DBMS supports stored procedures. Use this property to change the stored procedure or to change the data source from a SELECT statement or script to a stored procedure (see the example). Painter: Set when Stored Procedure is selected as a data source. |
Select |
A string containing the SQL SELECT statement that is the data source for the DataWindow. Use this property to specify a new SELECT statement or change the data source from a stored procedure or Script to a SELECT statement. Table.Select has several advantages over the SetSqlSelect method:
If you are using describeless retrieval (the StaticBind database parameter is set to 1), you cannot use the Select property. Painter: Set when Select or Quick Select is selected as a data source. |
Select.Attribute |
(Read-only) A string containing the PBSELECT statement for the DataWindow. |
Sort |
(exp) A string containing the sort criteria for the DataWindow, for example, "1A,2D" (column 1 ascending, column 2 descending). The Table.Sort property sorts the data before it is retrieved. To sort data already in the DataWindow's buffers, use the SetSort and Sort methods. The value for Sort is quoted and can be a DataWindow expression. Painter: Rows>Sort. |
SQLSelect |
The most recently executed SELECT statement. Setting this has no effect. See Select in this table. |
Update.Argument |
(Internal use only) A string containing arguments to pass to the update method. |
Update.Method |
(Internal use only) The name of the method. |
Update.Type |
(Internal use only) Currently stored procedure is the only type implemented. |
UpdateKey InPlace |
Whether the key column can be updated in place or the row has to be deleted and reinserted. This value determines the syntax PowerBuilder generates when a user modifies a key field:
Caution When there are multiple rows in a DataWindow object and the user switches keys or rows, updating in place might fail due to DBMS duplicate restrictions. Painter: Rows>Update Properties, Key Modification. |
UpdateTable |
A string specifying the name of the database table used to build the Update syntax. Painter: Rows>Update Properties, Table to Update. |
UpdateWhere |
An integer indicating which columns will be included in the WHERE clause of the Update statement. The value of UpdateWhere can impact performance or cause lost data when more than one user accesses the same tables at the same time. Values are:
For more about the effects of this setting, see the discussion of the Specify Update Characteristics dialog box in the section called “Controlling Updates in DataWindow objects” in Users Guide. Painter: Rows>Update Properties, Where Clause for Update/Delete. |
Examples
setting = dw1.Object.DataWindow.Table.Sort dw1.Object.DataWindow.Table.Data.Storage = "disk" dw1.Object.DataWindow.Table.Filter = "salary>50000" setting = dw1.Describe("DataWindow.Table.Sort") dw1.Modify("DataWindow.Table.Filter='salary>50000'") dw_l.Modify (" DataWindow.Table.Procedure= & '1 Execute MyOwner MyProcName;1 & @NameOfProcArg=:NameOfDWArg, & @NameOfProcArg=:NameOfDWArg...' ") sqlvar = 'SELECT ... WHERE ...' dw1.Modify("DataWindow.Table.Select='" + sqlvar + "'")