Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello There

I have a C# application in which I am using SQL transaction.
At a point if we make changes in a table (after begin transaction) and again reuse of same table then the system not allow to make changes and it stops working.
So I want to know is there any alternate solution available to do the same because I can't even fetch the data from that table.

Need Suggestion
Best Regards
Posted
Comments
OriginalGriff 12-Jan-13 5:28am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Perhaps if you show us the relevant code fragment you are using to do this?
Use the "Improve question" widget to edit your question and provide better information.
Mayank Topiwala 12-Jan-13 5:34am    
Let's Say a Transaction Processing System starts with :
Insert into DaysMaster Values (.....)
And now I need some data from DaysMaster
Select * From DaysMaster Where Days ='...'
So the problem is I can't fetch data from DaysMaster.

Based on the description, it sounds like you're having either a lock collision or even a deadlock.

Try investigating from SSMS what the halted session is waiting for. For this you can use either activity monitor or query sys.dm_tran_locks[^]
 
Share this answer
 
i thing First you are inserting data in table and then fetch the same data from table and u r using transaction, means before committing you are trying to fetch data, so try to commit first the the fetch data
 
Share this answer
 
Comments
Mayank Topiwala 12-Jan-13 23:43pm    
Yes Vishal I know this thing and that's my problem.I don't want to fetch the updated data; I just want to fetch the previous records.
Like in Access database we can select the record from a table even if that table in the process of transaction.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900