Dispose() or myConn.Close()
-----Original Message-----
From: clemens.wyss@h... [mailto:clemens.wyss@h...]
Sent: 11 November 2002 16:53
To: ASPX_Professional
Subject: [aspx_professional] Automatically close SqlConnection
Hi all,
I have singleton wrapper around a SqlConnection object. Upon first fetch
of the singleton the DB-connection is opened.
Now I would like to automatically close this connection whenever the page
rendering is done (i.e. just before returning the http response). Is
there an event (or hook-method) I can make use of?
Alternative: is there a hook method in Object which is called upon
disposal (i.e. garbage collection)?
Regards
Clemens