Home  /  Questions  /  Question



50   50
May 20, 2010


SQL Server connection timeout, does Distributed transaction solve that?

I am using the architecture recommended by DoFactory (.Net 2.0) for my product. That is, i have UI (asp.net), Middle tier(Business Object and Facade) and then DAO.

For example i have order class which has multiple order detail classes. To save order, i call a method say SaveOrder in Facade as following:

TransactionDecorator
{
    Call Dao object to Save Order first
    Get Order Id
    Call Dao object to Save Order details
   Transaction.Complete()
}

Now, TransactionDecorator, starts DTC and inside this all the operations are consider as atomic. Well, before this , i used to pass the whole order object as XML format (Like get data from UI and form XML) to SQL server SP. Sometime, if data is huge, i used to get SQL time out error as it was single DB connection and inside that i was trying open XML and do insert/update/delete operations.

Now my doubt is, would the current framework solve the time out problem where i am using DTC? Here i passing order once, then come back, loop through each order details and update one at at time. 


Well, if the answer is DTC would handle time out problem, then how DTC manage the connection to DB till last operation executed as it may long time and SQL server time settings?

Can anyone help me out?