MS Access Vs SQL Server

Discussion in 'Databases' started by john_a_antoniou, Nov 15, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm using asp.net with MS Accessand I noticed[​IMG] that I need to close the connection (MANUALLY)after the use because I can have only 64 open connections. Does SQL Server needs to close the connections manually or automaticaly?How many open connections does SQL Server support?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    You always want to close the database connection after the application is done using it regardless if you use MS Access or MS SQL.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Bruce... I have to give you credit for showing great restraint and not going into your "don't use access" argument (as valid as it is).


    Bruce is right, you always want to close your connections. Some people can semi-effectively use Access to drive their websites, but it is even MORE imperative to close connections in Access, as there is a limited number of concurrent connections (as you have found out). If you open the connection, run your query, use your data, then close your connection right away, you can get it working pretty well.


    So not only is your code cleaner, it runs better as well.



    Mike Reilly, Secretary/Webmaster
    Kiwanis Club of Rancho Penasquitos
    "Serving the Children of the World"
    [email protected]
    (760) 419-7429
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    Closing connection is one of 'must do' regardless what database backend you are using.

    Many think that ASP.NET has automatic garbage collection but GC doesn't kick in real time, you will run into problem if you have a very busy site.

    MS SQL can take up to 64K of connections but the connection pool on the web server will run out of space and you will get a very ugly error.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page