Re: what are the ways to ensure a sql connection is close?
From: Karl (_at_)
Date: 10/26/04
- Next message: Alex: "ASP Net - Server Application Error"
- Previous message: Bliss: "Config of a web app for multiple regions."
- In reply to: Asha: "what are the ways to ensure a sql connection is close?"
- Next in thread: Tom Dacon: "Re: what are the ways to ensure a sql connection is close?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 25 Oct 2004 22:50:29 -0400
You can call Dispose() on the SQlConnection.....this will ensure that the
connection is closed, and won't cause any harm if it already is (it itself
checks to see the state of the connection).
All you need to make sure is that you aren't calling dispose() on a null
reference (of course).
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/ "Asha" <Asha@discussions.microsoft.com> wrote in message news:D75D33A5-354A-4AC8-9569-E2941989FA2D@microsoft.com... > greetings, besides using objconn.State() to find out if a sql connection is > close or open, is there any other way to accomplish this task? thanks in > advance. > anywhere is sql server or the machine to tell this? > >
- Next message: Alex: "ASP Net - Server Application Error"
- Previous message: Bliss: "Config of a web app for multiple regions."
- In reply to: Asha: "what are the ways to ensure a sql connection is close?"
- Next in thread: Tom Dacon: "Re: what are the ways to ensure a sql connection is close?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|