>>Since you're alone on your box, why write code to test when you can simply open the services applet in the control panel and stop the SQL server service, just for testing?
>
>First, thank you. I thought about it. But this will disconnect not because the application is idle but for "another" reason. And I can't test the case where - in case of a customer - the connection is lost due to being idle.
>Unless you think it is the same, being idle or service has stopped.
What would the difference be? Your connection handle is invalid in both cases, and that's what you need to fix by reconnecting. If I'm not mistaken, idledisconnect() fixes both. But let's wait for Walter on this one.