PowerServer (and PowerClient) now fully supports the DataWindow SQLPreview event.
You can turn on or off the SQLPreview support for a DataWindow through the CloudAppSet function (it is turned off by default).
CloudAppSet ("enablesqlpreview", "true")
When SQLPreview support is turned on, DataWindow Update uses the line-by-line commit approach (for each line of code, a separate request is sent to the server) rather than committing the entire DataWindow data to the server in one request, therefore, in the Web architecture, the performance is easily affected by the network. If there is batch data update in the DataWindow, it is recommended NOT to enable SQLPreview support for that DataWindow.
You can consider enabling SQLPreview support for only some DataWindow Updates. For example:
//Enable SQLPreview support before update, and then disable it after update. CloudAppSet ("enablesqlpreview", "true") if dw_1.update() = 1 then commit; else rollback; end if CloudAppSet ("enablesqlpreview", "false")