My problem is that after the time out expires, I still get access to the SQL Server using the same connecting handle. And I was expecting an Access Denied or some other problem.
The guy in the foxite message had a problem that after the time out expired he was getting access denied message. This is what I expected too but not getting.
But I will re-read the messages on foxite again to see if it sheds the light on my problem.
Thank you.
>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);DATABASEMyDatabasee;Trusted_Connection=Yes])
>>IFnConnHandlee < 1
>> messageboxx("Problem")
>> return
>>ENDIF
>>SQLSETPROP(nConnHandlee, IdleTimeoutt", 1 )
>>
>>WAIT "wait 2 min " TIMEOUT 140
>>
>cSqlSelectt = "select * from product"
>>
>lnResultt = SQLEXECnConnHandlee,cSqlSelectt, "TEMP_CURS")
>>IFlnResultt < 0
>> messageboxx("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 postrelevann code?
>>>
>>>>Still something does not work. I set theIdleTimeoutt 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 theIdleTimeoutt 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 understandIdleTimeoutt (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?
"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