473,804 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

closing connection in web application.

Hi all,

I am new to asp.net. I am developing one application. I want to open
and close connection for session. Means when user first time logged
in i want to open connection and store that in session. and when user
logged off close connection. But what if user IE only. How will i
handle this situlaton.

Please help me asap.

thanks in advance.

Sep 7 '07 #1
1 1214
Open and close your connections as needed. Connection pooling will return
already prepared connection for you from a connection pool so this is not a
performance hit.

The benefit is that it allows to serve N users with a much lower number of
connection (each user doesn't need a connection all the time, a connection
is needed just when the page runs).

--
Patrice

"archana" <tr************ **@yahoo.coma écrit dans le message de news:
11************* ********@d55g20 00...legro ups.com...
Hi all,

I am new to asp.net. I am developing one application. I want to open
and close connection for session. Means when user first time logged
in i want to open connection and store that in session. and when user
logged off close connection. But what if user IE only. How will i
handle this situlaton.

Please help me asap.

thanks in advance.

Sep 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
297
by: ajaykrishna | last post by:
Hi Could any one tell me what is the latest version of System.Data.OracleClient? Currently I'm using version 1.0.1012.0 in my project which is giving problem of not closing connection eventough I'm issuing connection Close() statement.I am trying to connect Oracle 8i from ASP.NET framwork 1.1 in my application. Initially I tried to put Connection Lifetime property to 60 seconds, when the application using Pooling concept. But this did not...
6
1856
by: Steven Blair | last post by:
Hi, I am writing an application using a 3 tier model (Client, Business Layer and DB) The DB layer creates a OdbcDataReader object back up to the Client where the data is read and displayed on the screen. I then call the Close method of this OdbcDataReader. I had assumed this closed the connection to the Database, but apparently not (using processlist in MySQL confirmed the connections were not being closed). How can I successfully...
13
1800
by: Simon Harvey | last post by:
Hi All, I have a colleague that I wprk with that develops using ASP. I develop using ASP.net. He seems to make sites much faster than me and I am wondering if its because of the two different technologies. I use codebehinds as standard Does anyone else find that developing with ASP.net takes more work than asp.
2
987
by: Evan | last post by:
Hi guys... I am developing an application and need some advice while the application is still in its infancy. 1. Set Conn = Server.CreateObject("ADODB.Connection") 2. Conn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("documents.mdb") 3. Set rs = Server.CreateObject("ADODB.Recordset") 4. SQL="SELECT * FROM users" 6. rs.close 7. set rs=nothing
5
5227
by: Daves | last post by:
is it a good or bad practise to use the session_start & session_end for opening & closing the database connection? I'd thought that on powerful servers today the time the connection is kept locked should not matter as scripts (especially .Net!) are now run in milliseconds?
7
1806
by: Tumurbaatar S. | last post by:
Is it so important to close database connections? As I understand, after processing a request and sending a response, page object destroyed. So all used connections also destroyed. Yes?
3
2674
by: Andy G | last post by:
I have some code that hits a DB2 database from my ASP.NET application. I haven't been able to exactly nail it down but my connections are not getting closed for some reason. I look at the database and it's like everytime I click a button in the ASP.NET applicaiton and it runs a database command it leaves the connection open. The DBA's are not happy with me right now. Luckily I'm still in test. Does anyone have any idea why the below...
4
2662
by: arbpen | last post by:
I am concerned about performance. Usually, in a situation where I am not using a global.asa (shared host, etc), I explicitly close the connection at the bottom of the page in a footer, eg: conn.Close set conn = nothing Now, I am working with a global.asa file, and the following: sub Application_OnStart conString = "driver={sql server}......" Application("conString")=conString set Conn = Server.CreateObject("ADODB.Connection")
5
2365
by: zacks | last post by:
If I close and dispose an ODBCConnection object, shouldn't the connection actually close? I have found that even after closing and disposing an ODBCConnection, the database it was connected to still has an active connection as long as the application is still running. I have to close the application to actually close the active connection to the database. Is this normal behaviour? Is there a way to really close the connection while the...
6
1169
by: klaas | last post by:
Hi, i'am writing a program in vb.net 2005 based on an access database. Now, i want to close my program automaticly when the user is inactive to a period of eg 10 minutes. I want to close all mine connections to the database en quit the program. is there a procedure to achive this or even better an example of this on the net? regards, Klaas
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.