close connection when there is no db activity for a specific period of time

Hello

I want to close a TAdoConnection (connected to a SQL server 2000) when there
is no db activity for a specific period (for example 1 period).

The applications is used by many users. They start the application in the
morning and leave it open all day and now and then they use the application
for a short period of time.

Any samples?

Marco