Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

SQL table locked infinity when access us from c# code

$
0
0
I have a code that execute this steps in some table: 1 - Update 5000 rows with will be to extract, is a bit column with value NULL 0 or 1 2 - Select 5000 rows 3 - Do some work in C# 4 - Update 5000 rows with will be end of extract, is a bit column with value NULL 0 or 1The code work and can extract all days like 100000 rows.Some times for some reason the table is locked because can no more update anything, and i can see this: a - From MSSMS i can update, select or delete this table b - Write some code to acess again this table and not work again c - Restart SQL service and continued not work d - Rename the table, creat other table with the some data and the application run again with sucess. e - And the more strange is change the connection string to my renamed table in my application c# and continued can't update anything.Someone can tell me why this is happen or anyone already pass for this issue's.Thanks for any help.

Viewing all articles
Browse latest Browse all 3145

Trending Articles