Home All Groups Group Topic Archive Search About

for some reason when i deploy my C# application on windows 2003 occasionaly rdr[0].ToString() hangs

Author
22 Mar 2006 7:36 AM
Daniel
for some reason when i deploy my C# application on windows 2003 occasionaly
rdr[0].ToString() hangs where rdr is a System.Data.SqlClient.SqlDataReader.
Is there a fix for this? is my visual studio.net out dated?

Author
22 Mar 2006 1:30 PM
Jason Hales
I assume you're only using one sqlDataReader at a time with your
sqlConnection and you're explicitly calling the Close() method when
finished?

Is rdr[0] ever a null value?  If so ToString will raise an exception

Are there any other exceptions being raised which you're trapping and
not reporting?

Is there a lock occuring on the table in your SQL database that is
preventing the reader from returning?

AddThis Social Bookmark Button