Here’s my code for reading my db data:
OdbcDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
PetraStruct.TFmTop TempTop = new PetraStruct.TFmTop();
TempTop.Name = (string)rdr["TOPNAME"];
TempTop.MD = Convert.ToDouble(rdr["MD"]);
}
rdr.Close();
After running cmd.ExecuteReader(), I can see my reader has results:

For some reason, when while(rdr.Read()) is excuted, rdr.Read() returns false, and my results are blown away:
My whole while block is skipped, and I end up at rdr.Close().
Does anyone have any idea as to what might be going on, and how my results get blown away when I try to read them?
How about using Debug->Exceptions menu? Not all exceptions are enabled by default, that’s why you are confused. Enable all of them and then you’ll see what is going on.