Hi,
I have a sqldatareader populated with this command:
string cmdlookup = String.Format("Select {0} from {1}", strSourceName, strSourceTable);
SqlCommand sqlcom = new SqlCommand(cmdlookup, con);
SqlDataReader rdrsource = cmd.ExecuteReader();
while (rdrsource.Read())
{
this.lstSourceValues.Add(System.Convert.ToString(rdrsource[strSourceName]));
}
rdrsource.Close();
There is a function elsewhere in the program to modify this table. I have verified that it does indeed update the table in question. The table now has 11 values.
This results of this query NEVER CHANGES. It always returns 5 rows, even though a function elsewhere in the application has clearly updated the table. A few lines below I close the connection, too.
Is this thing cached somehow? Why doesn't the query update?