SQL Server :: Can Explicitly Store Data Into Buffer Cache

Dec 13, 2010

one of my stored procedure has 4 select statments and gets data from large tables,

can i explicitly store result of stored procedure into buffer cache?,

and when calling stored procedure, than returns data from buffer cache?

View 2 Replies

Similar Messages:

C# - Store Dynamically Changing Data Into Server Cache?

Apr 7, 2010

EDIT: Purpose of this Website: Its called Utopiapimp.com. It is a third party utility for a game called utopia-game.com. The site currently has over 12k users to it an I run the site. The game is fully text based and will always remain that. Users copy and paste full pages of text from the game and paste the copied information into my site. I run a series of regular expressions against the pasted data and break it down. I then insert anywhere from 5 values to over 30 values into the DB based on that one paste. I then take those values and run queries against them to display the information back in a VERY simple and easy to understand way. The game is team based and each team has 25 users to it. So each team is a group and each row is ONE users information. The users can update all 25 rows or just one row at a time. I require storing things into cache because the site is very slow doing over 1,000 queries almost every minute.

So here is the deal. Imagine I have an excel EDIT(Excel is just an example of how to imagine it, I don't actually use excel) spreadsheet with 100 columns and 5000 rows. Each row has two unique identifiers. One for the row it self and one to group together 25 rows a piece. There are about 10 columns in the row that will almost never change and the other 90 columns will always be changing. We can say some will even change in a matter of seconds depending on how fast the row is updated. Rows can also be added and deleted from the group, but not from the database. The rows are taken from about 4 queries from the database to show the most recent and updated data from the database. So every time something in the database is updated, I would also like the row to be updated. If a row or a group has not been updated in 12 or so hours, it will be taken out of Cache. Once the user calls the group again via the DB queries. They will be placed into Cache.

The above is what I would like. That is the wish.In Reality, I still have all the rows, but the way I store them in Cache is currently broken. I store each row in a class and the class is stored in the Server Cache via a HUGE list. When I go to update/Delete/Insert items in the list or rows, most the time it works, but sometimes it throws errors because the cache has changed. I want to be able to lock down the cache like the database throws a lock on a row more or less. I have DateTime stamps to remove things after 12 hours, but this almost always breaks because other users are updating the same 25 rows in the group or just the cache has changed.This is an example of how I add items to Cache, this one shows I only pull the 10 or so columns that very rarely change. This example all removes rows not updated after 12 hours:

DateTime dt = DateTime.UtcNow;
if (HttpContext.Current.Cache["GetRows"] != null)


View 4 Replies

Web Forms :: Buffer Cannot Be Null / Parameter Name - Buffer

Nov 9, 2013

I am using Http handler page to get images from database into gridview using C# in asp.net.I am trying to delete the selected row from database, when I click on delete button the row is deleted and the page redirecting to http handler page and firing the error "'Buffer cannot be null. Parameter name:Buffer'".And one more thing is I don't want to go to execute every time pageload event, how can I control this event also.

View 1 Replies

SQL Server :: Data For The Column Xx Is To Large For The Specified Buffer Size?

Feb 17, 2011

I have a DTS script which transforms a Tab delimited text file to a table. I get the following error when trying to transform the data of a field that is greater than 255 chars:


I have seen this issue with importing from Excel with the jet 4.0 engine, however I am importing a text file.

View 3 Replies

Where Should Store A Data Table ViewState/ Session/ Cache

Apr 21, 2010

I have a DataTable with about 10,000 rows in it.

I would like to store this data once for aspx page. When the user selects different options in the page, data is further selected from the already stored DataTable.

I tried using the ViewState, but as soon as the data grows beyond 100 rows, performance degrades.

View 1 Replies

Custom Server Controls :: How To Programmatically Cache A Server Control And Add A Cache Dependency?

Feb 11, 2011

I have a server control that I developed which generates navigation based on a third party CMS API. Currently I am caching this control using the PartialCaching attribute. The CMS uses cache key dependencies to invalidate the cache when a user makes an edit, however in the case of my server control it does not get invalidated and the updated navigation will not show up until the cache expiration set by the PartialCaching attribute.Here is my two part question:

What is the proper way to programmatically cache a server control, without using the PartialCaching attribute, and adding a cache key dependency?

Is it possible to continue to use the PartialCaching attribute and add a cache key dependency?

View 2 Replies

SQL Server :: Communication Buffer Resources With Another Process And Has Been Chosen As The Deadlock Victim. Rerun The Transaction

Nov 15, 2010

While updating table Un handled exception was raised (asp.net with c# and SQLServer 2005)

Error Message: "Transaction (Process ID 91) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

View 2 Replies

C# - How To Store And Retrieve A Particular Segment From The Cache

Mar 8, 2011

It should store plain HTML fragments of a page like the standard Output cache in asp.net .The HTML may contain dynamic content from a database.When an object is updated in the database all the cached HTML fragment containing that particular object should be destroyed and re-cached next time it will be requested.

There is a separate admin tool to handle all data in the database so I can easy store the Id's in a cachetable when an object is invalid. I can also make a request to a page that destroy all cached HTML fragment for that object.

But when I write the markup, how could I do to store and retrieve a particular segment from the cache? Of cause I could do this in code behind and have the markup in a string but I don't want that. I want to have the markup as intact as possible.

View 2 Replies

.net - Browser Store The Cache Item?

Jan 24, 2011

If i enable client side cache in my asp.net application where it store that cache controls in my computer

View 1 Replies

Asp.net - Store Unserializable Objects Into The Cache?

Mar 3, 2011

I've seen numerous examples of people storing DataTables into the Cache, but I am just wondering, do the same rules apply to the Cache that apply to the Session? The one rule I am most concerned with is:Do not store unserializable objects into the Session. Just because you can doesn't mean it is guaranteed to work So ultimately my question is:Can you store unserializable objects into the Cache?I reasearched this for a while, reading numerous posts and even reading the chapter about Cache in my ASP.NET 3.5 book and I cannot find it anywhere.I am going to put my DataTable into a DataSet then into the Cache,but is this necessary?

View 3 Replies

Architecture :: Distributed Caching / Keeping Cache In Sync Between Multiple Webservers Or Even Better Farm Cache Management To Another Server?

Feb 26, 2010

I've got a web application that runs of a state server. It looks like soon it may need to distributed and there will be two web servers behind a load balancer.

This works great for session state but my next challenge is Cache

My application leverages heavily of cache. I understand ASP.Net 4.0 will be offering more here but nothing much has been said about the how too.

There are two challenges that I face

1). Each webserver will have its own copy of cache whereas it would be more efficient to put this to a third server the same as session state is put to state server.

2). The real challenge is keeping cache in sync if a simple dataset derived from the database is changed my code dumps that cache item and reloads the cache. That's all well on one webserver but webserver number two wont know to drop that particular cache item and reload it. This could cause some unexpected problems in the application.

For scenario number 2 I could attempt to do some smart coding so server number two knows to dump the cache and reload it.

My guess is someone else has already been here before and there's probably a better implementation approach rather than writing extra code.

Does anyone know how I could achieve the goal of keeping Cache in sync between multiple webservers or even better farm Cache management to another server?

View 2 Replies

.net - Use Custom SqlMembershipProvider To Store Users (and Roles) In Cache?

Feb 15, 2011

i'm developing a "small" warehouse-management WebApplication for few users(5-10 parralel) but with a complex authorization system(checking if pages,menus,TabPanels, UserControls and even single controls are visible or enabled) and permanent and frequent access. Because i've only limited experiences with the ASP.Net MembershipProvider, i'm unsure what's the best approach for following goal:

I want to hold all users, roles and frequently used masterdata in the Cache(in a Dataset). Hence every readonly access should be faster and causes less traffic than always using the database. On updates,deletes and inserts i would update the cached dataset and also the database.Can i use or extend the SqlMembershipProvider to achieve this goal and if possible how?Should i use the stored-procedures from asp.net or simply use the standard CreateUser, GetUser, DeleteUser-functionality? Does this approach makes sense at all?

View 1 Replies

C# - Add Cache-Control: No-store In Authenticated Pages In DotNetNuke 5.4.4?

Jan 31, 2011

I would like to know what is the best way to include Cache-Control: no-cache, no-store in authenticated pages in DotNetNuke 5.4.4. In fact, I want to prevent caching in IE6/7 and FireFox as well.

View 1 Replies

.net - Using HttpCache To Buffer Data From A Web Service?

Aug 15, 2010

What problems might I encounter by using the HttpCache to buffer data from a web service, as opposed to storing the same data in a database table? In a hypothetical situation whereby the service was temporarily unavailable, if the server needed to reboot during that time there would be no way to re-populate the cache. So for that reason, is it possible to persist the cache like you could do with SqlServer Session state?

I read the HttpCache is implemented using the Singleton pattern. Does that mean I should be using Mutex when working with objects coming from the cache?

What will happen if the cache is being updated on the one hand by a separate threaded process while also being read by a different thread?

View 1 Replies

Gridview - Can Explicitly Force To Re-load The ViewState Data Of Any Data-contro

Jun 30, 2010

I have a problem regarding to asp.net lifecylce hierarchy.

Basically, I have one user control which has a GridView in it. And this GridView is dynamically generated based on a public property on the control (named Parameter in the simplified code below).

Everything is fine when I insert this control in an aspx page, set its Parameter property and call DataBind(Parameter) on it. GridView is generated and populated on the UI.

Problem occurs when I post-back the page. I have to regenerate the GridView structure so that the data in the ViewState of the control can be used to populate the GridView. So that I can achieve its content. But as long as the GridView structure is generated dynamically and it is based on the Parameter property set on it, this is not possible. Because the OnInit of the user control is called before the OnInit of the page and that is why the Parameter property is set after the generation of the GridView structure. As a result I get an empty Gridview in the end.

Here is the code in a simplified way.

Can you give me some recommendation how to overcome this?

Can I explicitly force asp.NET to re-load the ViewState of a gridview?


View 1 Replies

C# - How To Load External Data Files Without Defining Path Explicitly

Mar 27, 2011

I have a C# assembly that loads external files. This assembly is used by asp.net website. The following is the code that loads the data files

string dataDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"data"); filePath = Path.Combine(dataDirectory,_fileName);

The component works fine in a windows app, but when I tried to use it in an asp.net website, it fails as the site could not find the data files. And it gives me the following error:

C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filescmictranslatorsite20a8eddd864b2575assemblydl35bd4a35e8c6f79b6_98eccb01datafile.txt

View 1 Replies

C# - Will HttpResponse - Filter Buffer The Whole Data Before Start The Sending?

Apr 6, 2010

An user posts this article about how to use HttpResponse.Filter to compress large amounts of data. But what will happen if I try to transfer a 4G file? will it load the whole file in memory in order to compress it? or otherwise it will compress it chunk by chunk?

I mean, I'm doing this right now:

public void GetFile(HttpResponse response)
String fileName = "example.iso";
response.ContentType = "application/octet-stream";


So at the same time I'm reading, I'm compressing and sending it. Then I wanna know if HttpResponse.Filter do the same thing, or otherwise it will load the whole file in memory in order to compress it. Also, I'm a little bit insecure about this... maybe is needed to load the whole file in memory to compress it... is it?

View 1 Replies

Data Cache Support Background Population Of Cache Entries?

Aug 1, 2010

We have a data driven ASP.NET website which has been written using the standard pattern for data caching (adapted here from MSDN):

public DataTable GetData()
string key = "DataTable";
object item = Cache[key] as DataTable;


The trouble with this is that the call to GetDataFromSQL() is expensive and the use of the site is fairly high. So every five minutes, when the cache drops, the site becomes very 'sticky' while a lot of requests are waiting for the new data to be retrieved.

What we really want to happen is for the old data to remain current while new data is periodically reloaded in the background. (The fact that someone might therefore see data that is six minutes old isn't a big issue - the data isn't that time sensitive). This is something that I can write myself, but it would be useful to know if any alternative caching engines (I know names like Velocity, memcache) support this kind of scenario. Or am I missing some obvious trick with the standard ASP.NET data cache?

View 3 Replies

ADO.NET :: Use HttpContext.Current.Cache (system.web) For Cache Data Something In Project

Sep 13, 2010

I have use Nhibernate in my MVC Project by me known, Nhibernate have cache on Session and Object. now, I want use HttpContext.Current.Cache (system.web) for cache data something in project. my code same that have problem, haven't it. and that's right or wrong.

View 2 Replies

Web Forms :: Display Cache Data Only Instead Of Server Side Code

Feb 7, 2011

I am working on page where data will update in every 10 second by scraping data from other Stock website. So basically page is displaying stock data which update in every 10 seconds. I am using update panel and timer control. Now problem is that if 100 users open the webpage 100 request go server in each 10 seconds. I want to implement Cache on page where Cache version of page serves to other user. I am using <%@ OutputCache Duration="10" VaryByControl="Timer1" %> but when event occur code run intends of delivering Cache version of page. What I am doing for test.

1) Open page in different browser in local

2) Checking browser type using code

Dim s As String = ""
With Request.Browser
s &= "IP = " & HttpContext.Current.Request.UserHostAddress & vbCrLf
s &= "Browser Name = " & .Browser & vbCrLf
End With
Label1.Text = s

if page first open in IE then if I again open in firefox it shows browser type IE but after 10 sec interval it will update type to firefox. So I want to display Cache data only instead of executing server side code for each different browser.

View 1 Replies

State Management :: SQL Server Based Cache Dependency Without Data Source Control?

May 29, 2010

I want to use SQL Server based Cache dependency without data source control.How can I do it?I am binding data to grid through code.

View 5 Replies

C# - Store Class Instance (helper Class) In Cache?

Jun 30, 2010

I have a class instance which is created by using Activator.CreateInstance() method. That class instance contains helper methods which are frequently used throughout the application. In order to avoid creating the instance multiple times, I'm just thinking about implementing an appropriate caching mechanism. The following consideration should be taken into account:

1) I can't use static class and methods.
2) There are around 6 instances (1 instance per class) per App Domain.

View 4 Replies

Security :: Store Some Data Into Sql Using Server.HtmlEncode

Mar 25, 2011

I would like to ask when im trying to store some data into sql using Server.HtmlEncode Could i use code behind for example like this ?


View 3 Replies

SQL Server :: Store Large Amount Of Data In DB?

Dec 18, 2010

i want to to sotre large amount of character in one field of a table i use text-nvarchar(max) and but it show me this exception

(String or binary data would be truncated The statement has been terminated.) I know that text and nvarchar can store 8000 character

View 7 Replies

MVC :: Explicitly Set Action Method?

Mar 11, 2010

I have 2 views for a input operation in my application.

The first view (lets call it view1) submits a form. Based on the form some operations on database is done and second view(View2) is returned with some other data from the database as a model.


Now, since I return a new view and not a action redirect the url is still http://url/View1 but everything works as it is supposed to.

When I submit the form in View2 it calls the View1 action method, not the View2 action method. Probably because the url is still View1.

View 1 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved