Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
YAQ on Connection Time out
Message
From
23/05/2010 13:20:29
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01465578
Message ID:
01465636
Views:
43
I think this explains it:
http://www.foxite.com/archives/application-roles-sqlserver-0000061406.htm

His complaint is different but it demonstrates what happens after the IdleTimeOut expires -


>Here is a snippet of code that hopefully demonstrates the issue as I see it:
>
>
>nConnHandle = SQLSTRINGCONNECT([DRIVER=SQL Server;SERVER=(local);DATABASE=MyDatabase;Trusted_Connection=Yes])
>IF nConnHandle < 1
>	=messagebox("Problem")
>       return
>ENDIF
>SQLSETPROP( nConnHandle, "IdleTimeout", 1 )
>
>WAIT "wait 2 min " TIMEOUT 140 
>
>cSqlSelect = "select * from product"
>
>lnResult = SQLEXEC(nConnHandle, cSqlSelect, "TEMP_CURS")
>IF lnResult < 0
>        =messagebox("Problem")
>        return 
>ELSE
>	SELECT TEMP_CURS
>	BROWSE 	
>ENDIF
>
>
>I thought that after time out of 2 minutes and with the Idle Timeout set to 1 min, I should get an error when trying to call SQLEXE() again. Let me know, please, if you see what I am missing.
>
>>Can you post relevan code?
>>
>>>Still something does not work. I set the IdleTimeout to 1, wait more than 2 minutes, then call the SQLEXE() with the same handle and data is returned with no error.
>>>
>>>>Why do you think that it's expressed in seconds?
>>>>
>>>>>
>>>>>Thank you, Gregory. But what I don't understand is when I set the IdleTimeout to 10 and then wait a minute (greater than 10 seconds) and then call SQLEXE() with the connection handle I get no error and the data is returned. The way I understand IdleTimeout (from you message and the VFP Help) is the handle obtained initially should be invalid and I should get an error. What am I missing?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform