473,473 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Create 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 1042
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,relations,...
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
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. ...
2
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,...
10
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. ...
13
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...
16
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...
10
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...
0
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...
1
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...
2
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
1
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
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.