473,385 Members | 2,274 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,385 software developers and data experts.

sqltransaction timeout issue

Hello,
I have a asp.net application in which users can create content and
then save everything to a SQLServer2000 database.
When they hit the save button on the form here is what I do :

Dim conn As SqlClient.SqlConnection = New
SqlClient.SqlConnection( myconnectionstring )
Dim tx As SqlClient.SqlTransaction

conn.Open()
tx = conn.BeginTransaction("Cutting Saving")

here I save stuff to the database (_adpCutting is my dataadapter)
_adpCutting.UpdateCommand.Transaction = tx
_adpCutting.InsertCommand.Transaction = tx
_adpCutting.Connection = c
_adpCutting.Update(_dtCutting)

if everything succeeded :
tx.Commit()

otherwise I rollback

I've noticed that when I'm debug mode and I stop just after
_adpCutting.Update(_dtCutting), then I can't access my SQL table from
anywhere (even from SQLServer Enterprise or any other applications).
It's like the transaction is holding the table, until I commit or I
rollback.

This wasn't an issue up until now. But with a growing number of users
and applications using this one table in the database, now I'm getting
loads of timeout errors. I'm not going to increase the timeout value
to be greater than 30 seconds, it doesn't make sense. Is there another
way to solve this issue ?

I'm not making progress on this, so I'd appreciate any help

thanks

Jul 11 '07 #1
2 4574
Hi
I've noticed that when I'm debug mode and I stop just after
_adpCutting.Update(_dtCutting), then I can't access my SQL table from
anywhere (even from SQLServer Enterprise or any other applications).
I guess the IsolationLevel of the transaction is serialisable. Do you really
need this level? If yes, there is no solution for your problem, otherwise
set it to the really needed level.

Greets
Daniel
Jul 12 '07 #2
I was not specifying any level in particular so I guess the default is
readcommited ?
The problem is that whatever isolation level I specify in
BeginTransaction, while the transaction is being executed, no one can
access the table in the database. It should only be the case if I was
using SERIALIAZABLE as you mentionned it. So is there any chances that
SQL Server is actually overriding whatever values I use with another
value of its own (serializable most likely) ? How can I check that ?

This is giving me a really bad time, and I don't know how I'm going to
solve this :(
On Jul 12, 7:04 am, "Daniel Marohn" <cami...@community.nospamwrote:
Hi
I've noticed that when I'm debug mode and I stop just after
_adpCutting.Update(_dtCutting), then I can't access my SQL table from
anywhere (even from SQLServer Enterprise or any other applications).

I guess the IsolationLevel of the transaction is serialisable. Do you really
need this level? If yes, there is no solution for your problem, otherwise
set it to the really needed level.

Greets
Daniel

Jul 12 '07 #3

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

Similar topics

2
by: mahajan.sanjeev | last post by:
I have two SQLConnection objects having the same connection string and two corresponding SQLCommand objects for each connection object. I am using SQLTransaction with the first SQLConnection object...
2
by: mahajan.sanjeev | last post by:
Hi, I am having problems with rollback using the SQLTransaction object. I am trying to insert records in two tables in a transaction. I want to rollback all the changes if any exception occurs...
2
by: perspolis | last post by:
I'm using SqlTransaction in my application.. I use sqlCommand1.BeginTransaction(IsolationLevel.ReadUncommited) when I want to update some tables with this transaction,and at the same time I'm...
0
by: perspolis | last post by:
Hi all I used SqlTransaction inmy application.. SqlTransaction transact=sqlConnection1.BeginTransaction(IsoLationLevel.Something); sqlSelect.Transaction=transact; sqlInsert.Transaction=transact;...
0
by: Joe Rigley | last post by:
Hi All, I am using a SqlTransaction object to process a group of database insert / update statements on Sql Server 200 SP4 to complete a business process. Directly after the Commit method is...
5
by: Swami Muthuvelu | last post by:
Hi, I using command builder to generate my insert, update and delete statements..something like, data_adapter = New SqlClient.SqlDataAdapter(SQL, ActiveConnection) command_builder = New...
4
by: perspolis | last post by:
Hi all I have a master-detail tables in sql server. I use SqlTransaction to insert data into both tables. it works well but if I check the "Cascade Delete Related Records" option in it's realtion...
0
by: buttslapper | last post by:
Hi, Recently we discovered in our production server this kind of exception : We are wondering what causes the transaction to be zombied, and why do we get a nullreferenceexception in this...
3
MrMancunian
by: MrMancunian | last post by:
Ok, I'm stuck on a design problem and I need some feedback how to go around it. CASE: Pathologists can request stains on certain tissues. It's possible to request more than one stain a time....
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...

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.