common practice for accessing databases is to close the connection as soon as possible.
If you close your connection at the end you can get the following situation:
opening connection -> get data -> click on link for sub-table/refresh -> tries to open connection -> error
why? because the connection to that database is already open. (and locked).
After a while the connection will time out, and you can open it again (as you experienced)
a better way instead of setting the standard time-out to a shorter period would be:
opening connection -> get data -> close connection -> click link for subtable/refresh -> open connection -> get data -> close connection.
Now maybe for an access db this kind of practice isn't -that- important, but as soon as you're using bigger multi-user db's, things like this will get quite important.
__________________
Amerika by Franz Kafka
“As Karl Rossman, a poor boy of sixteen who had been packed off to America by his parents because a servant girl had seduced him and got herself a child by him, stood on the liner slowly entering the harbour of New York, a sudden burst of sunshine seemed to illumine the Statue of Liberty, so that he saw it in a new light, although he had sighted it long before. The arm with the sword rose up as if newly stretched aloft, and round the figure blew the free winds of heaven.”
|