Forum > Databases

How to set the connection timeout period?

(1/1)

zhuyl:
How to set the connection timeout period? The database is MSSQL.

Zvoni:
At a guess: Use the Params-Property of TMSSQLConnection.
Something like (Aircode)

--- Code: ---MyMSSQLConn:=TMSSQLConnection.Create;
//Set other Properties, Databasename, Host, Port etc.
MyMSSQLConn.Params.Add('Connect Timeout=30');
MyMSSQLConn.Open;

--- End code ---

zhuyl:
Thanks!
How to set the execution timeout of SQLQuery1?

Zvoni:

--- Quote from: zhuyl on November 18, 2021, 10:37:43 am ---Thanks!
How to set the execution timeout of SQLQuery1?

--- End quote ---
You don't. AFAIK, it's a Server-Side Parameter which is valid for all queries.
In that vein: It's a connection Parameter (see above)

Navigation

[0] Message Index

Go to full version