Avoiding database contention?
Q: I am actually .Net professional. I want to get around some Lakhs of records from SQL server 2005 by using ADO.Net.For this I want to use the Disconnected Data Access techniqe (i.e. Data set). My actual problem is using DataSet it is not possible to get that much amount of data, So please provide me a code of Stored procedure with which i want to do the Paging (each on of 500 Records).
Kevin Kline says: Hello, I’m assuming you mean “locks” here. 500 records is not in the least a large amount of records, so I’m surprised that ADO.Net won’t allow you to get and manipulate this amount of records. Since I’m not a ADO.Net programmer, I can’t give you any help with your ADO code. On the other hand, you should be able to ge the records you want without locking issues by issuing your SELECT statement using the NOLOCKS hint. Read about NOLOCKS in the SQL Server Books On-Line. I also like the article www.sql-server-performance.com/lock_contention_tamed_article.asp.
Technorati Tags:
.NET, ADO.NET programming, database locks, database contention