Why cannot I update my datawindow?

Source: Internet
Author: User
1 floor wind1825 (listening to the song of the sea) Back to 10:46:00 score 0

In the data window, choose rows/update propertires ...,
In updateable columns, you can select the fields to be updated. Top

Vetica (lost) on the second floor) Back to 10:57:00 score 0

The primary key in the update attribute of the data window is the same as the key word of your table?
In addition, what is your datawindow style?
Have you used the setsqlselect function? Top

Awen on the third floor) Back to 11:00:00 score 0

The update attribute is automatically canceled when the setsqlselect statement is used! Top

Yusi (White Rabbit) on the 4th floor) Back to 11:13:00 score 0

If no primary key is defined, it cannot be updatetop.

Rshmiao (lost) on the fifth floor) Back to 11:16:00 score 0

I used the setsqlselect statement. What should I do? Top

Awen on the 6th floor) Back to 11:32:00 score 15

Modify the update attribute!
As follows (idw_dw is the data window object, and ls_col is the column name)
For... (all columns)
Idw_dw.modify (ls_col + ". Update = 'Yes'") // sets the Update column.
If this column is the primary key then
Idw_dw.modify (ls_col + ". Key = 'Yes'") // set the primary key
End if
Next
// Set the update table attribute
Idw_dw.modify ("datawindow. Table. updatetable = '" + as_tablename + "'")

Top

Vetica (lost) on the 7th floor) Back to 13:37:00 score 5

In fact, calling the setsqlselect function does not necessarily automatically cancel the update attribute.
only the following conditions make the datawindow object unupdatable
1. There are multiple tables in the from clause
2. The updatable columns of the datawindow object are computed columns in the SELECT statement.
I think you may be the first case? Use the awen method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.