Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Connection timeout
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01641891
Message ID:
01641906
Views:
50
>>>When connecting to SQL server from a VFP 9 application where is the time out set? in VFP application or in SQL server?
>>> How do I determine and change it? (I want to force a time out so that I can test my code).
>>>
>>>TIA
>>
>>sqlsetprop(0, 'ConnectTimeOut', lnTimeOutInSeconds)
>>
>>
>>To test you can misspell the name of the server.
>
>Hugo,
>
>I probably misunderstood. Say my app creates a connection to the SQL Server and the handle number is 1. So I want to make this hand to time out in 10 seconds. I tried:
>
>sqlsetprop(1, 'ConnectTimeOut', 10)
>
>
>Then I wait 10+seconds but the connection handle (1) is still valid. What am I missing?

Ah, I missunderstood, I thought you wanted to time out when unable to connect for n seconds, what you want is IdleTimeout. "The idle timeout interval in minutes. Active connections are deactivated after the specified time interval. The default value is 0 (wait indefinitely). Read/write."

SQLSETPROP(1,"IdleTimeout", 1)

Hugo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform