Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Connection timeout
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01641891
Message ID:
01641906
Vues:
51
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform