pjoyce
04-02-2003, 10:01 AM
He's a stumper (for me at least) I've a data grid on my page bound to a strongly-typed dataset. The datagrid includes a delete function. Due to the nature of my app, I have do some checking and possibly do a cascading delete -- blah, blah, not important. Anyway, I noticed that the delete is not reflected in the datagrid. (the row still shows up after I call my delete function.)
I am forcing the page to re-query the DB after the delete, using a data adapter's Fill() method. I ran the process, stepped through the delete code, watched the transaction commit, queried the table in query analyzer and saw that there were, as I expected, two records in the table. I then stepped through the code which re-queries the database. The dataset (after the query, mind you) still had three records.
The only thing I can think is that SQL server is somehow caching the resultset, or else something in the data adapter is doing that. The data adapter lives on the page itself, I am not creating it in the codebehind.
peter.
I am forcing the page to re-query the DB after the delete, using a data adapter's Fill() method. I ran the process, stepped through the delete code, watched the transaction commit, queried the table in query analyzer and saw that there were, as I expected, two records in the table. I then stepped through the code which re-queries the database. The dataset (after the query, mind you) still had three records.
The only thing I can think is that SQL server is somehow caching the resultset, or else something in the data adapter is doing that. The data adapter lives on the page itself, I am not creating it in the codebehind.
peter.