1. Carl Bolduc
  2. PowerServer
  3. Wednesday, 4 October 2023 13:38 PM UTC

We are migrating an application using two database connections to PowerServer. When I build and deploy the application to a server (under IIS), it works, both connections are working. We still have a lot of work to do in this migration and I would like to be able to debug the application using the PowerBuilder IDE. At the momment, I can't figure how to make it work, here is what I have tried:

Our configuration (which works when we deploy the app in IIS):
1.jpg

For a specific situation, we change which connection is used through the DBParm parameter:
2.jpg

When we start the debugger, the Kestrel server starts:
3.jpg

When we start the app, we get cache name errors:
4.jpg

"The cache name was not found by the name of application..."

What am I doing wrong?

Attachments (4)
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 4 October 2023 14:14 PM UTC
  2. PowerServer
  3. # 1

Hi Carl,

Where does ltr_instance2 come from? Did you create this transaction object? Or is it another reference to SQLCA?

Regards,
Francisco

Comment
  1. Carl Bolduc
  2. Wednesday, 4 October 2023 15:13 PM UTC
Hi Francisco,



We have a custom transaction object which is assigned to the SQLCA properties. ltr_instance2 is a new instance of our transaction object, here are the lines above the screenshot I shared:

n_tr_bdh ltr_instance2

ltr_instance2 = Create n_tr_bdh

ltr_instance2.DBParm = "cachename='2'"



Thanks,

Carl
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 4 October 2023 14:31 PM UTC
  2. PowerServer
  3. # 2

Hi Carl;

  To be on the safe side, I would suggest first try ...

  1. Delete the PS repository folder as found in your PS Project's "Build" tab. For example: "C:\Users\Chris\source\repos\<SolutionName>"
  2. Delete the PB App from your Kestrel Web Server. For example: C:\Users\Chris\source\repos\<SolutionName>\ServerAPIs\wwwroot\<AppName>
  3. Perform another full "Build & Deploy" of your PS App
  4. Retry the PS App again.

HTH

Regards .. Chris

Comment
  1. Carl Bolduc
  2. Wednesday, 4 October 2023 15:13 PM UTC
Hi Chris,



Your suggestion helped. I can now see in the debugger that the connection to the second database is successful. I'm still getting a lot of cache name errors but that might not be related. I have several PowerServer incompatibility errors that I need to address which might be related.



On a side note, we plan to augment the generated API with additional routes. Destroying the project when we change the deployment method will not be an option in the future. Are there other ways to address the issue I experienced today?



Thank you!

Carl
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 4 October 2023 15:34 PM UTC
Hi Carl;

I am super glad that you were able to make some progress .. especially, now being able to use the PS Debugger (a very important Developer tool IMHO). :-)

I assume that for the Project changes, that you are referring to managing the various Cache's and/or adding ones "on the fly".

API: https://docs.appeon.com/ps2022/APIs_for_managing_cache_and_cache_group.html

Database: https://docs.appeon.com/ps2022/Storing_the_database_connection_in_the_database.html

HTH

Regards ... Chris
  1. Helpful
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.