G
Guest
I have a page which displays a sum of numbers from a table.
Also on this page is a textbox and button that causes an update to the table
that will affect this sum.
However, when I make the change to the database the change is not updated on
my page. I have simultaneously run sql query analyzer and verified that the
table was updated correctly.
Each time (at page load, and then after the button has been pressed), the
code path has been verified via break points, the value is to be displayed it
is recalculated via the following mechanism:
Using the global connection string a new SqlConnection object is built. Then
a new SqlCommand object is built using the new SqlConnection. The command
type is stored procedure. After the SqlCommand is setup (the command text and
parameters filled in), a new SqlDataAdapter is built using the SqlCommand.
The SqlDataAdapter fills a new DataSet, via the Fill method.
When I say that the object is new I mean that literally, as in
SqlCommand cmd = new SqlCommand (ConnectionString);
I'm assuming by the behavior that my table was cached. So, I'm wondering
what property or method I can use that will cause my query to view the cache
as invalid and get the correct values.
Thanks,
Dave
Also on this page is a textbox and button that causes an update to the table
that will affect this sum.
However, when I make the change to the database the change is not updated on
my page. I have simultaneously run sql query analyzer and verified that the
table was updated correctly.
Each time (at page load, and then after the button has been pressed), the
code path has been verified via break points, the value is to be displayed it
is recalculated via the following mechanism:
Using the global connection string a new SqlConnection object is built. Then
a new SqlCommand object is built using the new SqlConnection. The command
type is stored procedure. After the SqlCommand is setup (the command text and
parameters filled in), a new SqlDataAdapter is built using the SqlCommand.
The SqlDataAdapter fills a new DataSet, via the Fill method.
When I say that the object is new I mean that literally, as in
SqlCommand cmd = new SqlCommand (ConnectionString);
I'm assuming by the behavior that my table was cached. So, I'm wondering
what property or method I can use that will cause my query to view the cache
as invalid and get the correct values.
Thanks,
Dave