By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,874 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,874 IT Pros & Developers. It's quick & easy.

sqltransaction timeout issue

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.