Results 1 to 2 of 2

Thread: Connection String

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2002
    Posts
    80

    Question Connection String

    I don't know if I should close or dispose a connection string when I'm finished with it. I would like some who know the answer to reply. I've read several articles regarding connection string that are conflicting. I'm not sure if I should close it. Or if the GC handles this for me. If I don't close or dispose the connection, does it return the the connection pool?

    Thanks,

    James

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    You always have to close the connection to the database. If you're writing a web app, then it's always best to open connection, get/edit your data, close connection.

Posting Permissions

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



Click Here to Expand Forum to Full Width