Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Cannot lock session manager... |
Thu, Nov 25 2021 12:24 AM | Permanent Link |
Ian Branch | Hi Team,
Not sure if this should be here or in Connectivity. I have some code that executes before TEDBDatabase disconnects.. {code} procedure TdmC.DBC1BeforeDisconnect(Sender: TObject); begin // tqServerSessions.ExecSQL; nSessionCount := tqServerSessions.RecordCount; tqServerSessions.Close; // {code} tqServerSessions has the following SQL.. {sql} SELECT * FROM Configuration.ServerSessions WHERE (Pos('DBi', User) > 0) and (Connected = True) Order by ID {sql} Occasionally the Users get an error message.. "ElevateDB Error #506 Cannot lock the session manager (ID: 20)." with the error ostensibly occurring at the "tqServerSessions.ExecSQL;" Is there some way to mitigate this so it tries again? Is this related to one of the retry settings? I need this action to complete for follow up action. Regards & TIA, Ian |
Thu, Nov 25 2021 9:35 AM | Permanent Link |
Raul Team Elevate | On 11/25/2021 12:24 AM, Ian Branch wrote:
> > Occasionally the Users get an error message.. > "ElevateDB Error #506 Cannot lock the session manager (ID: 20)." > with the error ostensibly occurring at the "tqServerSessions.ExecSQL;" > > Is there some way to mitigate this so it tries again? > Is this related to one of the retry settings? > I need this action to complete for follow up action. Catch the exception and repeat - super simpler version though i would suggest something bit more sophisticated in the real world for i := 1 to 3 do begin try tqServerSessions.ExecSQL; nSessionCount := tqServerSessions.RecordCount; tqServerSessions.Close; break; except begin Sleep(250); //sleep approx 1/4 sec between retries end; end Raul |
Fri, Nov 26 2021 2:26 PM | Permanent Link |
Ian Branch | I like simple...
|
This web page was last updated on Tuesday, May 14, 2024 at 07:14 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |