The following code, under my programming environment produced by the source code and data window in the customer there is not the same,
I here it is
The column=(type=datetime update=yes updatewhereclause=yes
The customer is so
The column=(type=datetime updatewhereclause=yes
Why, very strange, is that there is no update properties, which master met,
String ls_dw new_syntax, error_syntaxfromSQL, error_create
Ls_dw="select * from t_saleexport"
New_syntax=sqlca. SyntaxFromSQL (ls_dw, & amp;
' 'Style (Type=grid), error_syntaxfromSQL)
IF Len (error_syntaxfromSQL) & gt; 0 THEN
Messagebox (' error creating Windows' error_syntaxfromSQL)
The ELSE
Dw_1. Create (new_syntax error_create)
IF Len (error_create) & gt; 0 THEN
Return
END the IF
Dw_1. Modify (" DataWindow. Table. UpdateTable='t_saleexport' ")
Dw_1. Modify (" [number]. Key=Yes ")
Dw_1. Modify (" [number]. The Key=Yes ")
DW_1. MODIFY (' updatewhere=1 updatekeyinplace=no datawiendow. Readonly=false ')
String ColName, Name1 []
Integer Columns, I, n1=0
The Columns=Integer (dw_1. The Describe (" DataWindow. Column. The Count "))
FOR I=1 TO the columns
ColName=Upper (dw_1. The Describe (" # "+ string (I) +". The Name "))
Name1=[I] ColName
Next
FOR I=1 TO n1
Dw_1. Modify (Name1 [I] + ". The update=yes ")
Dw_1. Modify (Name1 [I] + ". Protect=0 ")
Dw_1. Modify (Name1 [I] + ". Edit. Displayonly=no ")
Dw_1. Modify (Name1 [I] + ". Tabsequence="+ string (I * 10))
NEXT
Dw_1. Settransobject (sqlca)
Dw_1. Retrieve ()
END IF
CodePudding user response:
refer to the original poster wanggjvc response: the following code, under my programming environment produced by the source code and data window in the customer there is not the same, I here it is The column=(type=datetime update=yes updatewhereclause=yes The customer is so The column=(type=datetime updatewhereclause=yes Why, very strange, is that there is no update properties, which master met, String ls_dw new_syntax, error_syntaxfromSQL, error_create Ls_dw="select * from t_saleexport" New_syntax=sqlca. SyntaxFromSQL (ls_dw, & amp; ' 'Style (Type=grid), error_syntaxfromSQL) IF Len (error_syntaxfromSQL) & gt; 0 THEN Messagebox (' error creating Windows' error_syntaxfromSQL) The ELSE Dw_1. Create (new_syntax error_create) IF Len (error_create) & gt; 0 THEN Return END the IF Dw_1. Modify (" DataWindow. Table. UpdateTable='t_saleexport' ") Dw_1. Modify (" [number]. Key=Yes ") Dw_1. Modify (" [number]. The Key=Yes ") DW_1. MODIFY (' updatewhere=1 updatekeyinplace=no datawiendow. Readonly=false ') String ColName, Name1 [] Integer Columns, I, n1=0 The Columns=Integer (dw_1. The Describe (" DataWindow. Column. The Count ")) FOR I=1 TO the columns ColName=Upper (dw_1. The Describe (" # "+ string (I) +". The Name ")) Name1=[I] ColName Next FOR I=1 TO n1 Dw_1. Modify (Name1 [I] + ". The update=yes ") Dw_1. Modify (Name1 [I] + ". Protect=0 ") Dw_1. Modify (Name1 [I] + ". Edit. Displayonly=no ") Dw_1. Modify (Name1 [I] + ". Tabsequence="+ string (I * 10)) NEXT Dw_1. Settransobject (sqlca) Dw_1. Retrieve () END the IF Should be because the user is the table in the database t_saleexport unbuilt caused by primary key or unique index