Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Possible Sql server timeout and objects all the same

$
0
0
My little project.  Two ListBox's each with 1 column.  Both filled from different tables (4 rows, 3 columns).  Moving one or more items from one Listbox to the other (one table to the other)  In between reading reading from each table I create 4 class objects, one for each table row.  What I found is although its creating the 4 objects, they all have the same values, row 4 in table1.  I then checked the SqlDataReader, on first look, I see the 4 data sets, the first the same as the first row in the table1.  A few seconds later, Enumeration yielded no results.  I thought this was an issue with IEnumerable not reading the DataReader, then someone suggested a sql connection timeout.  That could be the problem, but it doesn't explain why the 4 objects are the same as the last row and not all different.  How do I prevent a connection timeout if that's all or part of the issue?   

Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>