Home > Back-end >  Delphi datasnap client dormancy, broken network after how to reply to connect manually?
Delphi datasnap client dormancy, broken network after how to reply to connect manually?

Time:02-11

Dear leaders,
After datasnap client if I open the computer to sleep or broken network, so mainform operation clientdataset query interface changes, shows a Socket Error # 10054 Connection reset by peer,
Window on the input data didn't save dare not close, is there any way to allow the user to manually reconnect?
Or program reset which place?

In addition the client starts up, mainform, clientmoduleunit, are creating together,

CodePudding user response:

This to see whether the client is disconnected, or the server and the client computer dormancy or broken network, it is 30 seconds automatically save time,
Words from the server can use multithreading, interval of 5 seconds to connect a server, the connection fails prompt the user or automatically in the connection,
The server suddenly broken network, can save also has no meaning, can't update database...

CodePudding user response:

I mean, that is, if the client network is broken, then the interface need connected to the Internet, if the operation database will jump out of a 100054 error, this time to the client can't normally closed, only the end of the process, the client network, timely,
Can manually let client clientmodule module to reconnect? As the client has just began to open the initialized connection?

CodePudding user response:

refer to the second floor g58521547 response:
I mean, is that if the client network is broken, then the interface need connected to the Internet, if the operation database will jump out of a 100054 error, this time to the client can't normally closed, only the end of the process, the client network, timely,
Can manually let client clientmodule module to reconnect? As the client has just began to open the initialized connection?


Client network impassability, even normal ClientModule cannot connect to the server, so be detected using multithreading in the background, 5 seconds detection time,
Detect network impassability, pop-up dialog box to inform the user, (if the user closes the dialog box, the end of the process, such as operation, continue to test, through the network, automatic connection server, close the prompt dialog),

CodePudding user response:

Then you connect to the server, the specific how to write?
I tried to use clientmoduleunit sqlconnection inside

Clientmodule1. SQLConnection1. Close;
Clientmodule1. SQLConnection1. Open; As if also not line

CodePudding user response:

The
reference 4 floor g58521547 reply:
then you connect to the server, the specific how to write?
I tried to use clientmoduleunit sqlconnection inside

Clientmodule1. SQLConnection1. Close;
Clientmodule1. SQLConnection1. Open; Not like
reconnect the server port to the IP have to write
  • Related