The way data is updated in the database. When the Update method is executed, it can send UPDATE, INSERT, and DELETE SQL statements to the DBMS. You can specify that a stored procedure be used instead of the default SQL statement for each type of data modification.
DataWindows
PowerBuilder dot notation:
dw_control.Object.DataWindow.Table.sqlaction.property
Describe and Modify argument:
"DataWindow.Table.sqlaction.property { = value }"
Parameter |
Description |
---|---|
sqlaction |
The SQL statement that would ordinarily be executed as part of a database update. Values are:
|
property |
A property for sqlaction. Properties and appropriate values are listed in the table below. |
value |
The value to be assigned to the property. |
Property for Table |
Value |
---|---|
Arguments |
A string specifying the arguments used in the stored procedure. The string takes this format: ("argname", valuetype { =("valuesrc" {, datasrc, paramtype } )
Argname is the name of the stored procedure parameter. Valuetype is one of the keywords described below. Datasrc and paramtype apply to the COLUMN keyword. Valuesrc is the column, computed field, or expression that produces the value to be passed to the stored procedure. |
Method |
A string specifying the name of the stored procedure. The stored procedure is used only if the value of Type is SP. |
Type |
Specifies whether the database update is performed using a stored procedure. Values are:
|
Set the values using Rows>Stored Procedure Update. Select the tab page for the SQL command you want to associate with a stored procedure.
If you enable a DataWindow object to use stored procedures to update the database when it is not already using stored procedures, you must change Type to SP first. Setting Type ensures that internal structures are built before you set Method and Arguments. If you do not change Type to SP, then setting Method or Arguments will fail.
When the values you specify in code are nested in a longer string, you must use the appropriate escape characters for quotation marks.
Each is all on one line:
dw_x.Describe("DataWindow.Table.Delete.Method")
dw_x.Describe("DataWindow.Table.Delete.Arguments")
dw_x.Modify("DataWindow.Table.Delete.Type=SP")
dw_x.Modify("DataWindow.Table.Delete.Arguments= ((~"id~", COLUMN=(~"department.dept_id!~", ORIG)))")
dw_x.Modify("DataWindow.Table.Delete.Method= ~"spname~"")