Symptom

When you do the Deploy PowerServer Project, it will fail to convert into C# models if you have DataWindows in your application created with temporary tables. You will see errors similar to the following in the output window:

d_grid_temporary_table Error: Invild object name '#temp_table'

Environment

PowerServer 2021

PowerServer 2022

Cause

PowerServer currently doesn’t support temporary tables when converting DataWindows to C# models.

Resolution

Use DataWindow control’s create method to work around the dependency on DataWindow. You can change your code as follows:
if IsPowerServerApp() then
    ls_syntax = dw_1.object.Datawindow.Syntax
    dw_1.Create(ls_syntax, ls_error)
end if
dw_1.settransobject(sqlca)
dw_1.retrieve()
0
0