473,382 Members | 1,204 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

ASP.net table lock upon record insertion

I'm writing a simple aspx page that allows users to key in some data and
submit them into a SQL2k database. I realised that even after that db
connection closes and the page unloaded and closed, the table will still be
locked in the database. Is there any way to unlock the table after the
process is completed?

Thanks in advance
Nov 19 '05 #1
4 2460
How are you locking the table with a closed connection?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 30 Jul 2005 18:18:45 +0800, "Nestor" <te**@test.com> wrote:
I'm writing a simple aspx page that allows users to key in some data and
submit them into a SQL2k database. I realised that even after that db
connection closes and the page unloaded and closed, the table will still be
locked in the database. Is there any way to unlock the table after the
process is completed?

Thanks in advance


Nov 19 '05 #2
thats my question.. how come it's still locked?
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:o6********************************@4ax.com...
How are you locking the table with a closed connection?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 30 Jul 2005 18:18:45 +0800, "Nestor" <te**@test.com> wrote:
I'm writing a simple aspx page that allows users to key in some data and
submit them into a SQL2k database. I realised that even after that db
connection closes and the page unloaded and closed, the table will still belocked in the database. Is there any way to unlock the table after the
process is completed?

Thanks in advance

Nov 19 '05 #3
1. closing DB connection in ASP.NET does not close it per say.
We have a DB connection pooling. So when you close it you simply releasing it for grab. And next DB request to open connection will grab already opened connection. Thus saving some time required to open DB connection.

You got to remmeber that if you are using TEMP tables in MSSQL

2. Connection per say does not lock tables. Only SQL statements do when they run as batch. I am positive that it's something else that locking your table.


George.

"Nestor" <te**@test.com> wrote in message news:uR**************@tk2msftngp13.phx.gbl...
thats my question.. how come it's still locked?
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:o6********************************@4ax.com...
How are you locking the table with a closed connection?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 30 Jul 2005 18:18:45 +0800, "Nestor" <te**@test.com> wrote:
I'm writing a simple aspx page that allows users to key in some data and
submit them into a SQL2k database. I realised that even after that db
connection closes and the page unloaded and closed, the table will still belocked in the database. Is there any way to unlock the table after the
process is completed?

Thanks in advance

Nov 19 '05 #4
Perhaps your "updating" code had a BEGIN TRAN but no COMMIT

Nov 19 '05 #5

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

Similar topics

17
by: Dr NoName | last post by:
Help! I have a table that multiple processes must be able to write to concurrently. However, it for some reason gets locked in exclusive mode. I narrowed it down to one SQL statement + some...
5
by: chintalas | last post by:
Here when many users are trying to update the same table the dead lock situation is arising. I like to know how i can put a lock at record level in my table, so that the dead lock situation will...
6
by: Bernd Koehler | last post by:
Hi: I am a EE prof currently teaching an IT course. One the assignments students recently completed was designing a small MS Access Database. I have two submissions that are remarkably...
2
by: adri4n | last post by:
as wat ive mentioned in the title.. im would like to know whether the a particular record/table is being locked in my program. some of the methods which i would like to develop are as below: ...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
0
by: shakahshakah | last post by:
Just started investigating InnoDB after having used MyISAM tables in the 4.0.12 version, almost immediately ran into a locking issue with INSERTs, DELETEs, and transactions. Given the following...
0
by: polocar | last post by:
Hi, I have noticed a strange behaviour of CurrencyManager objects in C# (I use Visual Studio 2005 Professional Edition). Suppose that you have a SQL Server database with 2 tables called "Cities"...
13
by: technocraze | last post by:
Hi guys, I have an issue with incrementing a counter in a table using VB in MS Acess environment. Below mentioned is an instance. Implementation logic Table fields Serialno = pk Datatype...
20
by: technocraze | last post by:
Hi guys & commnunity experts, Does anyone knw how to go about checking for existing data in an MS Acess table? I have tried out the following code using vb but doesnt seem to work that well? Can...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.