Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO.Net SqlDataReader Record Locking? timeout!

Status
Not open for further replies.

JFritzler

Programmer
Jul 19, 2001
18
US
I am using an ADO.Net SqlDataReader to read through a rather large query. As I process the data I want to execute an "update set x = y" statement on the database using a different command and a different connection (different connect string, timeout value is different) for the row I just read. At runtime I get an sql exception saying my update command timed out. (timeout expired). But the same "update" statement works fine outside the app!

Does a SqlDataReader lock the all records it is reading? I was hoping that because they are "fastforward read-only" that they would not lock records!

Am I stuck?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top