![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Sun, Jul 15 2012 7:09 PM | Permanent Link |
Blake | Hello,
I've seen variants of this issue come up several times and was wondering the best approach to handle it. In a Delphi app, someone is entering data. They leave for the night without saving (as users do) and when they come back in the morning they get a 11280 error, telling them they can't connect to the server. Opening a second application reveals that their connection is fine, it has just "fallen asleep" on the process that was left open overnight. I know that this can occur because the server itself has been reset. Is there any other occasion where this can (should?) happen. What is the preferred Delphi approach to catching this when it occurs and re-logging in? Using DBISAM 4.30. Thanks for any thoughts. |
Tue, Jul 24 2012 2:05 PM | Permanent Link |
Fernando Dias ![]() | Blake,
The approach i use is some applications is: 1. I always enable TSession.RemotePing, so that he server knows the clients are still there and dont disconnect the session. 2. A Timer checks the state of all opened tables every say, 3 minutes. If a table is in one of the dsEditModes, a counter is incremented (I use the Tag property for that), if not the counter is set to 0. When the counter reaches a limit, for example 10 (it would mean that the table has been in edit mode for approximately 30 minutes), the table is forced Post and if the Post Fails, to Cancel. The users are aware that they cant keep tables in Edit mode for more than 30 minutes, if they do, the application will force them to Post or Cancel. This is not always possible as it can become quite complex depending on the complexity of the UI - sometimes a post or cancel might imply changing the state of a lot of other things as you can imagine, but when it is possible to implement, its quite effective. In any case, the above only minimizes the risk of data loss when the users keep tables in Edit mode and doesn't solve your issue if the server is restarted, as you said. In that case the session will no longer exist when the server starts up again and there is no way to reconnect a non existent session. The only way would be to close the session and reconnect again. -- Fernando Dias [Team Elevate] Em 16-07-2012 00:09, Blake escreveu: > Hello, > > I've seen variants of this issue come up several times and was wondering the best approach to handle it. In a Delphi app, someone is entering data. They leave for the night without saving (as users do) and when they come back in the morning they get a 11280 error, telling them they can't connect to the server. > > Opening a second application reveals that their connection is fine, it has just "fallen asleep" on the process that was left open overnight. > > I know that this can occur because the serve r itself has been reset. Is there any other occasion where this can (should?) happen. What is the preferred Delphi approach to catching this when it occurs and re-logging in? Using DBISAM 4.30. > > Thanks for any thoughts. > |
Fri, Jul 27 2012 11:33 PM | Permanent Link |
Blake | Thanks, Fernando! Useful tips!
|
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |