Home > database >  [for] dynamic data window and update the relevant knowledge
[for] dynamic data window and update the relevant knowledge

Time:09-21

Who can help me to sort out the dynamic data window and update the relevant knowledge, new to many don't understand. Thank you best concrete

CodePudding user response:

Dynamically create DW check the create () function
UPDATE to check the UPDATE () function

CodePudding user response:

String ls_tb is_sql, ls_syntax ls_error, ls_ss
Dec 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
  • Related