Connection Timeout

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
JensFudge
Posts: 35
Joined: Mon 12 Jan 2009 08:37

Connection Timeout

Post by JensFudge » Fri 11 Mar 2011 13:37

Hi

I am wondering how to use the ConnectionTimeout property on the TMSConnection component..

I have tried setting it to 5 for a specific database, but it uses 14 seconds to get past the call to Connect;

I want to do something along the line of..

startTime := now;
MSConnection.ConnectionTimeout := 5;
try
MSConnection.Connect;
Except On Exception do
//Ignore the exception
end;
stopTime := now;

If not MSConnection.Connected then
log(starttime, stoptime);

As I say, it takes 14 seconds, and not 5 as I have set the ConnectionTimeout to.

Could you please advise?

Thanks in advance

Best Regards
Jens Fudge

AndreyZ

Post by AndreyZ » Tue 15 Mar 2011 11:24

Hello,

I cannot reproduce the problem. Please specify the following:
- the exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- the exact version of your IDE;
- the exact version of SQL server and client. You can see it in the Info sheet of TMSConnection Editor.

Post Reply