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:
01641911
Vues:
40
>>>>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

Thank you. I must be doing something wrong. I do SQLSETPROP(1,'IdleTimeout',1) but the connection handle works even after 2 minutes.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform