time out Expire Exception

  • Thread starter Danish Mustafa via .NET 247
  • Start date
D

Danish Mustafa via .NET 247

I'm trying to do mass inserts/updates. Using Transactions.
The table hierarchy contains 3 tables (TL1, TL2, and TL3):
Here is what I'm trying to accomplish:

1) Start Begin Transaction ()
2) check for Existing records
3) Grab the ID from step 2 by doing a SELECT on table TL1
4) Do an Insert/Update in table TL2 in a lopp these are child record by getting ID from TL3.
this work for the first time but then exception of time out expired occured while reading data again from the TL1.

and i wanna know how deep a nested transaction can work.
 
W

W.G. Ryan eMVP

There are three types of exceptions you could be getting here... a
Command.Timeout, a Connection.Timeout or a timeout w/ Asp.net - I'm guessing
it's one of the latter two and it's probably one of the latter two. While I
think changing the command timeout is usually a band aid and the first
course should be to look into why it's taking so long to complete and fix it
you can set this by using Command.TimeOut = WhateverInterval. You can only
specify the connection timeout in the ConnectionString. You can specify the
ASP.NET timeout in the web.config file
http://msdn.microsoft.com/library/d...n-us/cpguide/html/cpconaspnetarchitecture.asp

HTH,

Bill
Danish Mustafa via .NET 247 said:
I'm trying to do mass inserts/updates. Using Transactions.
The table hierarchy contains 3 tables (TL1, TL2, and TL3):
Here is what I'm trying to accomplish:

1) Start Begin Transaction ()
2) check for Existing records
3) Grab the ID from step 2 by doing a SELECT on table TL1
4) Do an Insert/Update in table TL2 in a lopp these are child record by getting ID from TL3.
this work for the first time but then exception of time out expired
occured while reading data again from the TL1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top