You need to be logged in to view a user's profile.
  1. Tor-Egil Nygaard
  2. PowerServer
  3. Friday, 29 July 2022 09:26 AM UTC

Hi,

Does anybody know how to get PowerServer to include datawindows against temporary tables in the cs-solution ?

In our application we have some datawindows which are created to work against temporary tables. When we create the PowerServer solution these datawindows are exluded ( d_role_configuration_tv_level_1 Error: Invalid object name '#role_treeview'. )

These datawindows appear in the build errors tab, and are not included in the solution.

The only solution I have managed to come up with is to create these "manually" in the cs-solution, but I am hoping somebody have managed to find a better/easier solution.

Fingers crossed.

 

Regards,

TEN

Accepted Answer
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Monday, 1 August 2022 07:33 AM UTC
  2. PowerServer
  3. # Permalink

Hi Tor-Egil,

 

You can try using DataWindow control's Create method to work around these model dependencies and see if it makes it easier.

For example, if dw_1 control uses d_role_configuration_tv_level_1 to retrieve data, you can make the following changes in PowerScript.

 

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()

 

Regards,

David

Comment
There are no comments made yet.
Tor-Egil Nygaard Accepted Answer Pending Moderation
  1. Monday, 1 August 2022 13:44 PM UTC
  2. PowerServer
  3. # 1

Hi,

We are using MS SQL Server. Temporary tables are only temporary, and cease to exist when you are done with them.

 

David's solution works (thank you!), and saves me creating the datawindows manually in the C# solution.

 

I would have preferred it if the PowerServer build process "trusted" the datawindow and just created the dw in the solution, but I now have a working workaround.

 

Regards,

Tor-Egil

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 1 August 2022 13:25 PM UTC
  2. PowerServer
  3. # 2

what database do you use?

Some databases (oracle for example) have temporary tables where the definition always exists, but the data is temporary to either the transaction or the session.   

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.