473,407 Members | 2,676 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,407 software developers and data experts.

Dataset Data bindings Best practices?

Neo
I was wondering what is the "right" way to deal with datasets is.
Particularly sharing DataSets between forms. Here is my situation.

I have a simple Customer Database, that holds some information about
Customers including thier address. Lets call this Table "Customers".
The Customers Table references another Table for Address information,
for instance I have a table of "Zipcodes",

Now I want an app with two forms, one form to browse my customers in a
report format and one form to edit one customer in my database. The
first form probably just contains a Datagrid but the second has a bunch
of controls bound to tables in the Dataset. For instance a combo box
for State that is bound to the "States" Table in my dataset.

Question 1: Should all the related tables be in one Dataset or should I
make a separate Dataset for each table. (Remember the tables are
referenced).

Question 2: Should each form have it's own set of DataAdapters and
Datasets?

If the forms each have their own Datasets I have to fill the dataset
each time the form pops up. In my example I am using a MS
AccessDatabase and it takes close to 3-5 seconds to fill the dataset.
Now I know that Access sucks and I should be using SQL, but to me this
is good test case for a far bigger "real" database.

Not to mention at this point I am now storing the entire database in
Memory in my App. Which wouldn't be entirly that bad if I wasn't doing
it multiple times for every form.

So my first Idea was to pass the filled dataset from the parent form to
the Child form, problem is I would have to update all the contol
bindings by hand. So I tried binding the Controls to a Dataview instead
of a Dataset and then setting the Dataview's Table to the Dataset Table
by hand, seems to work, but I am wondering if this may be a little
redundant.

The docs suggest building a component that handles your database access
for you. But how would you setup the binding on the controls in the
Designer with this configuration?

Any help or input would be appreciated. Thanks

Jul 21 '05 #1
0 1758

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

Similar topics

1
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...
4
by: Oscar Thornell | last post by:
Hi, I have a relativley large/complex typed dataset that contains 7-8 tables and some supporting relational tables (lookups) for many-to-many relations. A good exampel would be a dataset that...
2
by: John Granade | last post by:
I'm looking for the best way to make a dataset available from multiple Windows forms. The dataset is created from an XML file. I have a main form (frmMain) that loads the dataset and reads the...
0
by: Neo | last post by:
I was wondering what is the "right" way to deal with datasets is. Particularly sharing DataSets between forms. Here is my situation. I have a simple Customer Database, that holds some information...
2
by: JohnR | last post by:
I have a table in a dataset whose fields are bound to various controls on my form. The records are sorted by primary key so when I use the currencymanager to navigate the data, it all appears...
3
by: Mukesh | last post by:
Hi all I have to transfer a dataset and a string from a webform to a user control on the page without using viewstate or session or cookies . properties method is not working properly. if...
0
by: Chris | last post by:
Hello, I have a problem with re-loading datasets. As a simple example, if I have an SQL table of addresses comprising active and inactive addresss, I wish to load either sub-set by clicking on...
4
by: John Sheppard | last post by:
Hello there I was wondering if anyone could help me, I am trying to pass a typed dataset to a dialoged child form by reference. I have binding sources sitting on the child form. So to refresh...
0
Sl1ver
by: Sl1ver | last post by:
i created the dataset's bindings and everything using visual studio 2008 and on a access database, not i want to be able to work on both access and sql. im doing the update function to basically...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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:
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...
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
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...

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.