alexdoan
Posts: 6
Joined: Thu Nov 15, 2007 11:03 pm

Connection Timeout

Hi ,
I am getting a "Timeout Error" wihen runing a sql script.

I use my own custom connection string:

Driver={SQL Native Client};Server=(local);Uid=sa;Pwd=test;Database=test;Integrated
Security=SSPI;Connect Timeout=600;

but it still timeout in 30 seconds. it is not seeing 600 seconds.

Is there a way to fix this?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please note that the timeout cannot be specified through the connection string. It is specified through the SQLSetConnectAttr function which sets the SQL_ATTR_LOGIN_TIMEOUT parameter.

The connection is made through the SQLDriverConnect API which uses the connection timeout specified in the connection environment attributes, therefore the "Connect Timeout" in your string is ignored.

There are two solutions for this:
1) You wait until the we release the 6.2 version of Advanced Installer (a couple of weeks). This version will include a feature which allows you to specify the timeout you need.

2) You contact me at support at advancedinstaller dot com and I will send you a DLL used by Advanced Installer for the SQL connection. In this DLL we will hard-code the timeout you need and you can use it to build your package (please specify the timeout you want it if you need this DLL).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”