473,756 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

best way to keep persistence of a dataset?

Hi everyone?

Which is considered to be the 'best' way to cache a dataset and/or a crystal
reports reportdocument object?
ViewState? Session? Something else?

Thanks in advance!
Feb 1 '07 #1
7 2450

not viewstate. use session or recreate from database.

-- bruce (sqlwork.com)

patrickdrd wrote:
Hi everyone?

Which is considered to be the 'best' way to cache a dataset and/or a crystal
reports reportdocument object?
ViewState? Session? Something else?

Thanks in advance!
Feb 1 '07 #2
If the report is user session specific, store it in Session State. If it is
application - wide (for any user) store it in Cache or Application State. I'm
not sure if a Crystal Reports "ReportDocument " object is serializable, but if
it is, you could consider storing that in either Session or Cache with the
same criteria applying.
ViewState only stores objects between postbacks of the same page, and it is
grossly misused by developers and should be avoided.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"patrickdrd " wrote:
Hi everyone?

Which is considered to be the 'best' way to cache a dataset and/or a crystal
reports reportdocument object?
ViewState? Session? Something else?

Thanks in advance!
Feb 1 '07 #3
ViewState only stores objects between postbacks of the same page, and it
is
grossly misused by developers and should be avoided.
Even if you want to save the DataSet only across pages, still use Session to
store on server and not pass it in ViewState everytime.

And then, how to manage it... it's simple.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Feb 1 '07 #4
I just used ViewState because it is to be used only on one specific page,
but I'll try your recommendations and I'll try to store it in Session and
recreation from db and I'll check the time it does,
but:
1) what about variables that are to be used on one specific page only?
Should I store these in Session too?
2) Where should ViewState be used? Or shouldn't it be used in general?

"MasterGaur av (www.edujini-labs.com)" wrote:
ViewState only stores objects between postbacks of the same page, and it
is
grossly misused by developers and should be avoided.

Even if you want to save the DataSet only across pages, still use Session to
store on server and not pass it in ViewState everytime.

And then, how to manage it... it's simple.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Feb 1 '07 #5
>I just used ViewState because it is to be used only on one specific page,
but I'll try your recommendations and I'll try to store it in Session and
recreation from db and I'll check the time it does,
but:
1) what about variables that are to be used on one specific page only?
Should I store these in Session too?
No. Only and only in ViewState. Because that's the one meant for the pages.
2) Where should ViewState be used? Or shouldn't it be used in general?
Use it but with a care since the data is sent to the client side.
a) Don't store sensitive information.
b) Don't overload it. It's a burden on the network (bandwidth).

btw, why don't you have a look at Ajax (using Ajax.Net or otherwise) for
simple pages? I don't really know what your application is... but may be it
can be of help.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Feb 7 '07 #6
"MasterGaur av (www.edujini-labs.com)" wrote:
btw, why don't you have a look at Ajax (using Ajax.Net or otherwise) for
simple pages? I don't really know what your application is... but may be it
can be of help.
I use Ajax already but this app I had in mind when I posted this is a
Crystal Report app and I don't think I could avoid the postback.
What I would like to store is a dataset that very rarely changes.
I used ViewState and it was quite slow,
tried Cache a bit but seemed a bit awkward to me,
maybe I'll try to recreate the dataset in each postback,
as someone suggested here...
Feb 7 '07 #7
I use Ajax already but this app I had in mind when I posted this is a
Crystal Report app and I don't think I could avoid the postback.
Not quite sure... need to look into what exactly you are doing.

UpdatePanel in Ajax.Net allows converting existing post-backs to ajax-based
requests.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Mar 2 '07 #8

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

Similar topics

4
2156
by: Chuck Ritzke | last post by:
I keep asking myself this question as I write class modules. What's the best/smartest/most efficient way to send a large object back and forth to a class module? For example, say I have a data access module that creates a large disconnected dataset from a database. I want to pass that dataset back to the calling program. And then perhaps I want to send that dataset to another class module. At first it seems that the "object oriented"...
16
3036
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For example dsParts.xsd and including that in the data tier. I then will create a class that looks like this Public Class CPart Inherits dsParts
1
326
by: Joe | last post by:
I was wondering if there are any recommended persistence frameworks for use in .NET that could be recommended. I am looking for the following requirements: Free/Open Source or very inexpensive. Ease of deployment (no services to install/straight dll) Ability to define entity classes from existing schema and modify later. support for database defined enumerations 1:1,1: many, many:many, bidirectional relationships Transaction support
2
1506
by: Mike | last post by:
Hi, Right now I am trying design user data persistence in my winforms app and have a few questions. Right now the app is designed to save to a local file however down the road it might be changed to saving to a database. So, I was thinking about designing a dataset that if I do switch to a database that it will be easily be converted and dataset could be written to file as of right now. Is this a good idea or should I just create a...
1
2699
by: Romao | last post by:
Hi, None of the C#/ADO documentation I was able to read refers what are the best practices/implementations for this "kind of" problem, I would like to get help/opinions please, let me explain it: a) The App have several forms, parent and childs. b) On the parent Form I have one DataGrid displaying "myDataTable". c) On child Forms I have to edit just one Row of data from "myDataTable". d) After the Row edit finish on the child form the...
5
3703
by: Jason | last post by:
I am having problems understanding how to access a datasource only once, fill a single dataset, and then reference that dataset multiple times through different user controls(ascx) found on the same page. My main page(aspx) contains multiple user controls. The main page also contains a publicly declared dataset. At the first instance of needing data I call (from an ascx) a function that fills the dataset and then returns it to the...
5
1254
by: Richard Fagen | last post by:
Hi Everyone, I have been writing xBase applications for many years but I am new to VB/SQL for larger applications. In xBase, I would start the main program (form) by opening up all the datafiles (dbf) and indexes (cdx) that I would need to reference throughout the application. I would also keep these files open throughout the application.
3
2660
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links on the subject? (and yes, I have already googled it at length, but still no strong decision) ============= After a long stint of pure-desktop / pure-server applications, I'm currently working on a number of smart-client projects in C# using...
5
2604
by: Rob | last post by:
I have a form where the user may see a matrix of data in a grid (populated via a dataset). If the user wishes to add a new row of data, they click a button and a new form opens where the user may enter data into each textbox, then click the add button when finished. At this point a stored procedure is run which inserts the new row into the database (not the dataset), given that the row is not a duplicate and the contents of each text...
0
9456
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9843
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9713
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.