Table.sqlaction.property
property (DataWindow object)
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.
Applies to
DataWindows
Syntax
PowerBuilder dot notation:
|
1 |
dw_control.Object.DataWindow.Table.sqlaction.property |
Describe and Modify argument:
|
1 |
"DataWindow.Table.sqlaction.property { = value }" |
|
Parameter |
Description |
|---|---|
|
sqlaction |
The SQL statement that would ordinarily be executed Values
|
|
property |
A property for sqlaction. Properties and |
|
value |
The value to be assigned to the |
|
Property for Table |
Value |
||
|---|---|---|---|
|
Arguments |
A string specifying the arguments used in the
Argname Valuetype is one of the keywords Valuesrc is the column, computed field, or |
||
|
Method |
A string specifying the name of the stored |
||
|
Type |
Specifies whether the database update is performed Values
|
|
Keyword for valuetype |
Description |
||||
|---|---|---|---|---|---|
|
COLUMN |
The argument value will be taken from the table and
For
A sample string for providing a column
|
||||
|
COMPUTE |
The computed field named in valuesrc is the source A
|
||||
|
EXPRESSION |
The expression specified in valuesrc is evaluated A sample string
|
||||
|
UNUSED |
No value is passed to the stored |
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 2 3 4 5 |
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~"") |