Hi
Give me a small example of use newly added Ping method,
because in doc I can only read, that this method was added.
Ping method in TMSConnection - example of use.
-
AndreyZ
Re: Ping method in TMSConnection - example of use.
Hello,
You can use the Ping method in the following way:The Ping method can be used for the following tasks:
- to check availability of the server;
- to avoid automatic disconnection of the client by the server.
You can use the Ping method in the following way:
Code: Select all
MSConnection.Ping;- to check availability of the server;
- to avoid automatic disconnection of the client by the server.
Re: Ping method in TMSConnection - example of use.
Hm, Ping isn't return any value (void __fastcall Ping(void);)
May be this method fire some events on TMSConnection?
May be this method fire some events on TMSConnection?
-
AndreyZ
Re: Ping method in TMSConnection - example of use.
If a server is not available, the Ping method raises an exception (that is actually raised by the used provider, OLEDB or SQL Native Client).
Re: Ping method in TMSConnection - example of use.
OK
Is the right way to use Ping() method like in following example?
Is the right way to use Ping() method like in following example?
Code: Select all
try {
MSConnection->Ping();
}
catch (exception &Exception)
{
case (Exception)
switch Exc1:
DoSomething();
break;
switch Exc2:
DoSomethingElse();
break;
end
}