destroying connections

Results 1 to 2 of 2

Thread: destroying connections

  1. #1
    Join Date
    Dec 1969

    Default destroying connections

    Hi. I&#039;m looking for a good way to close and destroy a connection after I&#039;m done with it.<BR><BR>I am using a custom object to create and open a connection, then create and return a DataReader, based on a SQL string I pass in. This works fine, and when I&#039;m done with the DataReader I close it and set it to null (that&#039;s how you destroy an object in C#, right?). But how can I destroy the connection then, since I created it in the custom object?<BR><BR>I&#039;m happy to hear any alternative ideas about how to approach this.<BR><BR>Thanks!<BR>Corey

  2. #2
    Join Date
    Dec 1969

    Default RE: destroying connections

    Not sure if this is what your looking for or not but...<BR><BR>myConnectionObject.Close<BR>myConnec tionObject.Dispose

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts