...
SqlCeResultSet resultSet = _sqlController.getResultSet(ResultSetType.COUNTRIES);
if (resultSet.HasRows)
{
foreach (SqlCeUpdatableRecord record in resultSet)
{
// do something with the result
}
}
However, evertime it hit the
foreach statement the program would terminate. I suspected this was an infinite loop or some other issue. Well it turns out that indeed there is a bug in .NET 3.5 which causes the ResultSet to enter an infinite loop when the GetEnumerable( ) is called. An interesting article that outlines this is located Jim Wilson's Blog. Fortunately this issue only cost me a few minutes, but I was glad to see that this was a Microsoft issue and not my beginner C# programming skills at fault.

No comments:
Post a Comment