GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 90 of 164    Print  
Do you have to worry about database connection state in ASP.NET ? Why ?

  
Total Answers and Comments: 3 Last Update: April 11, 2007     Asked by: NithyaSurendran 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 09, 2006 03:11:11   #1  
aloksaxena01 Member Since: November 2006   Contribution: 7    

RE: Do you have to worry about database connection sta...
Well .NET 2.0 will provide different way to use to connect to database server. Definately the server side will be heavy in terms of processing if we use database connection state. Perosnally I prefered to go for connection mode status.If this is not clear then you can contact me aloksaxena01@yahoo.com
 
Is this answer useful? Yes | No
December 24, 2006 03:14:49   #2  
shree        

RE: Do you have to worry about database connection sta...

yes we have to worry becaz there are lot of reasons i will explain with scenarios.

Let we have written the code in the try block where we have connected to the db and there is exception occured.Now the connection is opened and we should be very carefull that the connection is closed in the catch block else it will remain open.


 
Is this answer useful? Yes | No
April 10, 2007 22:41:53   #3  
Robert        

RE: Do you have to worry about database connection sta...
try{Connection.Open()}
catch{...}
finally{ Connection.Close()}

The finally block will ALWAYS execute regardless of exception.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape