1. Manmeet Singh
  2. SnapDevelop
  3. Sunday, 19 February 2023 00:39 AM UTC

I checked below oracle connection and it works fine with console app using same object snap objects but gives error when run from powerserver. It connects but doesnt work further by below error:

 

PowerServer.Api.ServerApiController: Error: 'PowerServer.Api.ServerApiController.CommitAndCreateTransaction (PowerServer.Api)' get result (
{
"IsSuccess": false,
"RequestId": null,
"AppName": "xxxxx",
"NameSpace": "xxxxx",
"ErrorCode": 0,
"ErrorMessage": "Failed to commit because there is no available database connection or transaction"
}).

Manmeet Singh Accepted Answer Pending Moderation
  1. Sunday, 19 February 2023 03:56 AM UTC
  2. SnapDevelop
  3. # 1

Thanks @Armeen for your response. I added a connection check dialog in script and it got displayed mentioning that there was a connection.

I saw some documentation and there was a setting named LongConnection=1 to enable long persistent connections as I think it has to do with short connections which are lost and not available when the code is executing and looking for a connection. Any suggestions on that or have you used that?

Comment
  1. Armeen Mazda @Appeon
  2. Sunday, 19 February 2023 16:02 PM UTC
Yes, try setting that property and see if it resolves your issue. So I guess your app does display data but then at some point it loses the transaction?
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Sunday, 19 February 2023 01:13 AM UTC
  2. SnapDevelop
  3. # 2

In the PB project > application object > properties is "Begin session by code" NOT checked?

In the C# project > applications.json file is their correct DB connection defined?

In the PB project > DBParm have you set CacheName = to your DB connection defined in the C# project?

I strongly recommend carefully reading through entire DB configuration guide that is applicable to your project because DB connections work different in PowerServer vs. client/server: https://docs.appeon.com/ps2022/working_with_database_connections.html

 

 

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.