CodePudding user response:
Dynamically create DW check the create () functionUPDATE to check the UPDATE () function
CodePudding user response:
String ls_tb is_sql, ls_syntax ls_error, ls_ssDec li_row
Ls_tb='table'
Is_sql="select id, name, from" + ls_tb
Ls_syntax=sqlca. SyntaxFromSQL (is_sql, 'style (type=grid)', ls_error)
If len (ls_error) & gt; 0 then
Messagebox (' Error 'and' SyntaxFromSQL Error: '~ r + ls_error)
The else
Dw_4. Create (ls_syntax ls_error)
If len (ls_error) & gt; 0 then
MessageBox (" Error ", "Create have these errors: ~ r" + ls_error)
The else
Dw_4. Settransobject (sqlca)
Dw_4. Retrieve ()
Return
Dw_4. Modify (' datawindow. Table. UpdateTable="' + ls_tb + '"')
Ls_ss="id key=yes"//define the primary key
Dw_4. Modify (ls_ss)
Dw_4. Modify (py. Update="yes")//define can update field
//setitem
Dw_4. The update ()
End the if
end if
CodePudding user response:
More than a return