I have a store procedure and contains 2 update statements like
create procedure sp_update as begin tran update table A update table B commit tran
When I ran it from Query Analyzer it runs fine but when I ran it from .NET I am getting timeout expire but still all the SQL command inside store procedure ran successfully. Can you help me plz to find the solution? Thanks ss
How long does it take to run in Query Analyzer? How many rows does each update statement affect? What is the timeout setting in the application?
To see if you are getting a different execution plan from Query Analyzer than what the application is getting, run SQL Profiler and compare the execution plans.
If the execution plans are identical, which I suspect they aren't, then I don't see any reason why this would be happening.