Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 26th, 2006, 02:31 AM
Authorized User
 
Join Date: Feb 2006
Location: Karur, Tamildau, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Facing problem with Sql server

Hi All,

In sql server, the number of connections increases exponentionally and they are not closed. In my asp.net page i even added statement to close the connection in Finally block of exception handling.

I am facing a serious issue due to this.

Can any one please help on this...

regards
dsekar_nat

__________________
Regards,
dsekar_nat
 
Old July 26th, 2006, 03:26 AM
Friend of Wrox
 
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You only have to open ONE connection at the top of the page and close it at bottom of page. You can call the database many times between without having to close and reopen connection. If you do this, your design has to be changed.

 
Old July 27th, 2006, 02:52 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: Orange County, CA, USA.
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Only problem with Peso comments is what happens if the client disconnects while executing the page? Does the open connection section of the code get orphaned and never get to the close connection part? Ideally you should do it the way PHP does, I am not sure how to do this with asp though. The apache/php code opens a connection to the sql server and keeps it open for the execution of multiple pages with multiple clients. Constantly opening and closing sql connections causes wasted overhead on both your SQL server and your web server. As well each open connection consumes memory on your SQL server. This question may be better posted in an ASP forum.





Similar Threads
Thread Thread Starter Forum Replies Last Post
i am facing a problem mkazim85 SQL Language 2 April 20th, 2007 07:28 AM
Facing problem with tomcat 5.5.9 bhojrajjoshi Apache Tomcat 14 September 26th, 2006 04:44 AM
facing big problem Manish Malhotra Classic ASP Basics 1 June 19th, 2006 01:35 PM
Facing problem with commandtimeout altaf Classic ASP Databases 0 June 27th, 2003 08:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.