Table.sqlaction.property DataWindow object property
Description
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.
Controls
DataWindows
Syntax
PowerBuilder dot notation:
1 |
<span>dw_control</span>.Object.DataWindow.Table.<span>sqlaction</span>.<span>property</span> |
Describe and Modify argument:
1 |
"DataWindow.Table.<span>sqlaction</span>.<span>property</span> { = <span>value</span> }" |
Parameter |
Description |
---|---|
sqlaction |
The SQL statement Values are:
|
property |
A property for sqlaction. |
value |
The value to be assigned to the property. |
Property for Table |
Value |
||
---|---|---|---|
Arguments |
A string specifying the arguments used
Argname is the name of the stored procedure Valuetype is one of the keywords described Valuesrc is the column, computed field, |
||
Method |
A string specifying the name of the stored |
||
Type |
Specifies whether the database update Values are:
|
Keyword for valuetype |
Description |
||||
---|---|---|---|---|---|
COLUMN |
The argument value will be taken from
For COLUMN, you must also specify whether the data is the
You can also specify the type of stored procedure parameter. Values
A sample string for providing a column argument is:
|
||||
COMPUTE |
The computed field named in valuesrc is A sample string for providing a computed field argument is:
|
||||
EXPRESSION |
The expression specified in valuesrc is A sample string for providing an expression argument is:
|
||||
UNUSED |
No value is passed to the stored procedure. |
Usage
In the painter
Set the values using Rows>Stored Procedure Update.
Select the tab page for the SQL command
you want to associate with a stored procedure.
In code
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.
Examples
Each is all on one line:
1 |
dw_x.Describe("DataWindow.Table.Delete.Method") |
1 |
dw_x.Describe("DataWindow.Table.Delete.Arguments") |
1 |
dw_x.Modify("DataWindow.Table.Delete.Type=SP") |
1 |
dw_x.Modify("DataWindow.Table.Delete.Arguments=<br>  ((~"id~", COLUMN=(~"department.dept_id!~", ORIG)))") |
1 |
dw_x.Modify("DataWindow.Table.Delete.Method=<br>  ~"spname~"") |