How to use the Ping method?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

How to use the Ping method?

Post by ibdac1pro » Wed 18 Jun 2014 02:01

Hi,

if UniConnection.Ping then
ShowMessage('...');

Error....

How to use the Ping method?

UniDac 5.3.9.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to use the Ping method?

Post by AlexP » Wed 18 Jun 2014 08:19

Hello,

The Ping method is a procedure and it doesn't return execution result, therefore you should use a try...except block to handle it.

Code: Select all

try
  UniConnection.Ping;
  ShowMessage('OK');
except
 on E: Exception do
   ShowMessage(E.Message); 
end;

ibdac1pro
Posts: 48
Joined: Fri 25 Aug 2006 02:19

Re: How to use the Ping method?

Post by ibdac1pro » Thu 19 Jun 2014 01:44

Thanks a lot.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How to use the Ping method?

Post by AlexP » Thu 19 Jun 2014 06:56

If you have any further questions, feel free to contact us.

Post Reply