November 24, 2008 at 4:51 am
Hi All,
I am having one Sqltransaction in C# code, through this transaction am accessing a table T1.
Inside this transaction there are two operations,
1. Inserting a new record R1 into the table T1.
2. then updating the same record R1 of the table T1 inside the same transaction itself.(Its a simple straightway update statement.)
After this two operations sqltransactions and sqlconnections are properly closed.
But am getting command timeout while updating the record R1 in the second step.
Please let me know if anything is going wrong.
November 24, 2008 at 5:08 am
karthikeyankasi (11/24/2008)
Hi All,I am having one Sqltransaction in C# code, through this transaction am accessing a table T1.
Inside this transaction there are two operations,
1. Inserting a new record R1 into the table T1.
2. then updating the same record R1 of the table T1 inside the same transaction itself.(Its a simple straightway update statement.)
After this two operations sqltransactions and sqlconnections are properly closed.
But am getting command timeout while updating the record R1 in the second step.
Please let me know if anything is going wrong.
are you doing the insertion and updation via stored procedure or with the inline code in c#??
kshitij kumar
kshitij@krayknot.com
www.krayknot.com
November 24, 2008 at 5:14 am
I have two separate stored procedures for insert and update.
November 24, 2008 at 5:17 am
karthikeyankasi (11/24/2008)
I have two separate stored procedures for insert and update.
Merge both the stored procedures in one. and if not possible then
use separate command object for separate for separate sp, or
increase the commandout time of the sql object in c#
kshitij kumar
kshitij@krayknot.com
www.krayknot.com
November 24, 2008 at 5:50 am
thanks for your response.
I have separate command object for both STP calls. still am getting the time out error.
Also, if i increase the timeout then some of the other calls for the same object met with a deadlock.
please help me. this issue kills the app in production.
November 25, 2008 at 8:57 am
It's time to post the contents of the sp that's timing out. Is this sp new, or has it been around awhile? If it's been around awhile, has it been changed recently? Please also provide the table structure (create statements) for all tables involved, and indicate the indexes.
Steve
(aka smunson)
:):):)
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply