473,320 Members | 1,940 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,320 software developers and data experts.

No of Dataset to Adapters

I have a question, in that if i have an application is it better to have one dataset per data adapter, ie daCustomerTable -> dsCustomer, daOrders -> dsOrders etc. or to say have a couple of dataset one to hold static information and the other to hold transactional information like orders. Is there a memory overhead having one -> one relationship or having a static and transactional dataset more efficient ?
Nov 20 '05 #1
4 1200
Hi Mark,

Do it as you wish, when you are using the designer and the typed dataset you
probably will need for every dataset a dataadapter, when you are not (only)
using the designer you can just change the commands from the adapter and it
does what you want.

I find the last method the most easy way, however there are a lot who prefer
the first.

In my opinion there is no best method in dotNet, otherwise Microsoft could
have made a kind of super Access.

Just my thought about this,

Cor

Nov 20 '05 #2
Mark,
As Cor suggested, do it as it makes sense for your app. Design for
correctness first, I normally only address performance problems in those
routines that have proven via profiling to have performance issues...

Remember you can define DataRelations between DataTables within a single
DataSet, you cannot define a DataRelation between two DataSets.

I would probably define an Order Dataset, that included the Customer
information for that Order. However I may also have a Customer Dataset that
contained the complete set of customers. In other words the
OrderDataSet.Customer table would have a single row, while the
CustomerDataSet.Customer table would have multiple rows. You can use
DataTable.ImportRow to copy a row from CustomerDataSet to OrderDataSet...

Hope this helps
Jay

"markerussell" <ma**@russells-pwc.com> wrote in message
news:B0**********************************@microsof t.com...
I have a question, in that if i have an application is it better to have

one dataset per data adapter, ie daCustomerTable -> dsCustomer, daOrders ->
dsOrders etc. or to say have a couple of dataset one to hold static
information and the other to hold transactional information like orders. Is
there a memory overhead having one -> one relationship or having a static
and transactional dataset more efficient ?
Nov 20 '05 #3
Hi Jay,

This part I was also answering when I saw it was the dataadapter/dataset and
not the datatable/dataset question. And than I stuffed it again and started
new.

However good message so not for nothing.

Cor

Remember you can define DataRelations between DataTables within a single
DataSet, you cannot define a DataRelation between two DataSets.

I would probably define an Order Dataset, that included the Customer
information for that Order. However I may also have a Customer Dataset that contained the complete set of customers. In other words the
OrderDataSet.Customer table would have a single row, while the
CustomerDataSet.Customer table would have multiple rows. You can use
DataTable.ImportRow to copy a row from CustomerDataSet to OrderDataSet...

Nov 20 '05 #4
Cor,
It really depends on how you read the original question. :-)

I get the impression he either changed gears or is not familiar with the
terms...

From the OP:
I have a question, in that if i have an application is it better
to have one dataset per data adapter, Which is what you answered...

Also from the OP: to say have a couple of dataset one to hold static information
and the other to hold transactional information like orders. Which is what I answered, which is largely independent of the above
statement.

Also from the OP: Is there a memory overhead having one -> one relationship
or having a static and transactional dataset more efficient Which IMHO doesn't matter until a performance problem has been identified
via profiling. (taking into account "best practices").

Jay

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi Jay,

This part I was also answering when I saw it was the dataadapter/dataset and not the datatable/dataset question. And than I stuffed it again and started new.

However good message so not for nothing.

Cor

Remember you can define DataRelations between DataTables within a single
DataSet, you cannot define a DataRelation between two DataSets.

I would probably define an Order Dataset, that included the Customer
information for that Order. However I may also have a Customer Dataset

that
contained the complete set of customers. In other words the
OrderDataSet.Customer table would have a single row, while the
CustomerDataSet.Customer table would have multiple rows. You can use
DataTable.ImportRow to copy a row from CustomerDataSet to OrderDataSet...


Nov 20 '05 #5

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

Similar topics

4
by: suzy | last post by:
hello. how can i sort data in a dataset? all the examples i have seen on msdn, etc are sorting a dataview. this works fine, but i want to return the results in xml and the dataview doesn't...
2
by: Craig | last post by:
Hi I am using a dataset to display my information to a user, however my dataset is in no way matching all of the fields and columns of my ms sql database, I fairly extensively modify the data so...
2
by: Kenny | last post by:
Hello all, I've made a dataset by using the xsd tool in C#. In the xsd schema, there are a few tables, each has its own primary key. And, I've made relation between them. After all things are...
0
by: Michelle Stone | last post by:
I have several Data Adapters, and depending on certain conditions, I set one of them as the DataSource for a datagrid on my web form. In each of the data adapters, I have the primary key of the...
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...
8
by: Dot Net Newbie | last post by:
New to DOTNET so please be gentle: I have an in-memory dataset that I want move to a SQL Server database. The XML schema with which the dataset was built matches exactly the table schema in SQL...
0
by: Chris | last post by:
I think I have a mistake in how I thought I should use the dataset and table adapters in my project as I am getting foreign key constraint errors. Any help would be appreciated. I have for that...
0
by: billy.murray | last post by:
I have a system which comprises 4 servers (1 server per plant area). Each plant area server has 2 databases (Config<nand Runtime<nwhere <nis the plant area number) and 1 web application which uses...
8
by: Matt MacDonald | last post by:
Hi all, First of all, I am not trying to be the guy who comes in here shouting his mouth off at Microsoft. However, ever sinse I started using typed datasets in VS2005 I have been fighting with a...
2
by: Clive Dixon | last post by:
I want to create a typed dataset via Visual Studio but I don't want any of the SQL adapters stuff. I just want a typed dataset, no need to connect to a database. How can I stop Visual Studio from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.