(2003 to 2005)

No reason to close a database connection..? Hmm..

Tue Dec 23 04:03:00 UTC+1100 2003


I remember seeing this comment years ago now. It stuck with me.

I inherited the maintenance responsibility of some code that does some stuff for some people (I like being vague, it's fun). In fairness, I can see that the original developer (whom I have met once) was learning new stuff at the time, and had a very constrained budget and time-frame to get this system operational. His background was C, and this was his first foray into VB6, DAO and Access, which by todays standards are all sux technologies, but they were still good a few years ago, and really did help to lower the bar for companies that needed work-group database solutions, but they could be difficult to learn, particularly because they worked even when they didn't work..

Anyway, all that aside, I'm sitting here now, looking at this code, and I saw the comment again. This is it verbatim from the source file:

' Probably no reason why the databases can't be opened
' and left open

I'm tempted to write my own comment below, explaining all the reasons that the database connection shouldn't be left open. Anyway, I think this is funny, I hope someone shares my sense of humour.

Community Service Announcement for Software Developers: PLEASE CLOSE DATABASE CONNECTIONS.


Copyright © 2003-2005 John Elliot