473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cache problem with SQL server

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
Nov 19 '05 #1
2 952
..net has no caching feature for sql queries, so your diagnosis is wrong. you
must have a different problem. be sure you are not using any statics (shared
or module globals).

-- bruce (sqlwork.com)


"Dave" <Da**@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
| 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
Nov 19 '05 #2
Well, I didn't claim that .net had established the cache. And the only global
in the entire sequence is the connection string. Everything else (all those
things I said were new) are local's.

"bruce barker" wrote:
..net has no caching feature for sql queries, so your diagnosis is wrong. you
must have a different problem. be sure you are not using any statics (shared
or module globals).

-- bruce (sqlwork.com)


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bite My Bubbles | last post by:
I found the answer! It is a IIS 6 /ASP problem http://support.microsoft.com/default.aspx?scid=kb;en-us;332075
5
by: Alex | last post by:
Hi all, We're looking at a vendor who uses the InterSystems Cache Database Platform, but our IT department has zero experience with this system. This software package will have a pivotal and...
9
by: Just D. | last post by:
All, Did anybody see this strange effect? The web application is written in C#, ASP.NET, SQL, T-SQL, etc. A pretty usual stuff, complicated enough, but works fine until... Here is a question....
4
by: Angel | last post by:
I am saving items in the cache in my code behind. By setting these items with an expiration are these items only available for the page its being set or throughout the application? My next question...
2
by: Harry Simpson | last post by:
If anyone can chime in on these questions, I'd sure appreciate it. 1. How does the cache block fit in with the UIP Block - Is the "state" managed there handled any differently with the CAB...
18
by: siddharthkhare | last post by:
Hi All, what is the diference between these two cache control header. no-cache and no-store. I have read the w3.org explanation. So lets say I am using only no-cache ....my understanding is...
2
by: LeAnne | last post by:
My question is to do with scalability and the location for storate of cache, session, viewstate and application data. Application - Data is stored in memory (in process) Session - Data is stored...
0
by: SharpSmith | last post by:
hi i have a strange problem with OutPut cache working fine on development box and not working on production server background : @outputCahce directive is fine, but wanted to make centralized...
5
by: J055 | last post by:
Hi The following code works on my develeopment machine using the VS web server. When I run the application on 2 other Windows 2003/IIS 6 servers no caching seems to take place at all. Can...
5
by: Trapulo | last post by:
Hello, I'm developing an asp.net application that is connected to a remote system using WCF (wshttp binding). So I want to use a local cache to manage data that I receive from remote service. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.