-
Gururaja Udupa
- PowerServer
- Thursday, 8 October 2026 01:55 PM UTC
Hi,
While disconnecting the database using `DISCONNECT USING THIS;` inside the transaction object, we are getting the following error:
PowerServer[0]
Failed to commit because there is no available database connection or transaction
fail: PowerServer.Api.ServerApiController[1003]
CommitAndCreateTransaction(...):
{
"IsSuccess": false,
"AppName": "laboratory",
"NameSpace": "Laboratory",
"Type": "Commit",
"TransactionName": "sqlca",
"SessionId": "...",
"TransactionId": "...",
"ErrorCode": -1,
"ErrorMessage": "Failed to commit because there is no available database connection or transaction"
}
```
Before calling `DISCONNECT USING THIS;`, we verified that the database connection is active and valid. However, immediately after triggering the disconnect, PowerServer attempts to call `api/ServerApi/CommitAndCreateTransaction`, which fails with the above error.
The issue is also confirmed in the Fiddler trace, where the `api/ServerApi/CommitAndCreateTransaction` API call returns this error during the disconnect operation.
Could you please provide a fix or recommended approach to overcome this issue and properly disconnect the database connection in PowerServer?
Sample connection
atrans_obj.DBParm="CacheName='" + Trim(ars_cachename) + "',LongConnection=1,TrimSpaces=1"
Other Info
"ConnectionType": "SqlServer",
"EnablePooling": true,
"MinPoolSize": 0,
"MaxPoolSize": 100,
"ConnectionLifetime": 0,
"ConnectionTimeout": 15,
"CommandTimeout": 3660,
"SecurityOptions": "encrypt=False;trust server certificate=True",
"OtherOptions": "multiple active result sets=True;Pooling=False",
"DynamicConnection": false
Powerbuilder 2022 R3 Build 3391
Database: Microsoft SQL Server 2022
Thanks,
Gururaja Udupa
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.