>>Try
SQLSETPROP(0, "ConnectTimeOut", 2)
>
>This takes about 7 seconds now instead of the default 15 seconds. I also tried with 1 and it gives approximately 7 seconds. Do you know why it's like that?
No, I don't. Is your aplication using TCP/IP to communicate witrh Sql Server? You can add "Network=DBMSSOCN" to connection string to make sure that it does.
--sb--