473,830 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet Questions!

Hi all,

A couple of quick questions relating to datasets:

Is one dataset in a given page generally used to bind all controls to db
data?

If a dataset object is to be used globally by all, is it best to use the
'New DataSet' declaration in PAGE_LOAD?

What is the lifetime of a dataset in a client server environment?

Does the dataset exist in memory over multiple page requests?

Where does the IF Not IsPostBack statement come in when using datasets?

Cheers
Nov 19 '05 #1
1 1064
Hi Adam,

I'll try to anwser your questions but some are very general so expect general
answers.
Is one dataset in a given page generally used to bind all controls to
db data?
You have a choice.
Since a dataset is a collection of data and metadata (tables,relatio ns,...
its actualy a mini database) you could use 1 super dataset that gets filled
up very early in the page life cycle (PAGE_LOAD for example).
The controls on the page could than refer to this god dataset.
This strategy may have some advantages but most code I see create ad hoc
datastructures and bind to them individualy.
What is the lifetime of a dataset in a client server environment?
Once a dataset/datatable is filled up it has no connection to the database
(its a disconnected view of the data) so it doesnt hold up resources. This
is a good property if you need it.

That dataset can be saved to a disk file for example, be seperated for 1
week of the database, receive updates/deletes/inserts and than gets send
back to the database.
You have to beware of updata conflicts and other issues when you take this
road.
This is an extreme case of course. You can make the dataset live for as long
as you want.
Does the dataset exist in memory over multiple page requests?
Not if you don't take extra steps. You have to pack it into a in a session
var/application var/cache/... to get this desired behaviour.
Where does the IF Not IsPostBack statement come in when using
datasets?


The are not directly related.
IsPostBack is related to the concept of viewstate which makes it possible
for visible gui elements to remember its contents between server round trips.
Do you have specific code that gives you problems?
Let me know if you have any more questions..

Cheers,
Tom Peste
Nov 19 '05 #2

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

Similar topics

3
4611
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. I'm getting some strange results depending the input XML file I use. I was wondering if somebody could help me understand what is going on or point me to a good reference. The code for my program looks like this:
2
3606
by: Eric | last post by:
Hi, I am making a flash card type program for the PocketPC. I am using a dataset to contain the cards, all of that works great. I thought I would just import the XML into word or excel, copy/paste the data from other sources or add new records, and then save it as xml. As i have Office XP, that does not work. Is there a freeware XML dataset editor out there? I've found many editors,
10
1536
by: localhost | last post by:
I have a static, thread-safe class with a DataSet as a property. When the class is instanced into an object, some callers add rows to a DataTable in the DataSet. Other callers read the DataSet. When any caller reads the DataSet, I want the object to delete all of the rows in the DataTable. I think I want to make a custom event but I don't know where/how to get started. Help? Thanks.
13
1286
by: Lars Netzel | last post by:
I'm trying to copy data from two tables in a Source db into two Tables in a Destination db and the Tables designa are the same. I created 4 adapters... 2 for the two tables in the source db 2 for the 2 tables in the destination db Then I filled a SourceDataSet with the Source adapters
16
2494
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill it with incremental values e.g. if the tables looks like this: 23 56
10
6545
by: dauphian | last post by:
Hello, I am new to .net and am trying to build a report application that queries 4 different tables based on a id, and I need to return them in the same table for easy viewing. Basically, I have one querie that grabs all of the id's I need for the other 4 queries, but I am not sure how to get them into a DataTable or DataSet, or if that is the best way to do this. Seperately the queries all work with no problems.
0
1018
by: dlutz | last post by:
Good day to all -- I have been trying to load a dataset from XML based on a multi-level schema structure that uses <xsd:importtags to bring other schemas into the XML document context - Schema1 imports Schema2 which then imports Schema3. I have not been having much success. Based on the above experience, I have a couple of questions: 1) Can the Dataset class handle multi-level schemas as defined above? If not, thanks for your time.
1
1839
by: cpnet | last post by:
I'm trying to create a Crystal Report based on a strongly-typed DataSet (that I'm populating manually instead of from a database). This is almost working except Crystal seems to always do inner joins along the relationships in the DataSet, but I want an outer join. I have a table (QuestionTable) that's a list of questions. Each row contains the question, as well as the foreign key to a row in AnswerTable (which contains the...
2
1723
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Have a complex process where I need to Import a large amount of data then run some transformations on this data then import into DataBase. The transformation involves multiple fields and multiple process - so the data needs to be read in 1 record at a time then run thru the transformation that may create new data value then everything is imported into a db to store. I have multiple questions 1)we used to have an internal data structure...
0
10472
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10516
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
9307
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7736
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6939
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
5614
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
4407
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
3952
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3070
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.