Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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...


Reply With Quote
  #2 (permalink)  
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

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.

Reply With Quote
  #3 (permalink)  
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

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.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 06:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.