No of Dataset to Adapters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 ?
 
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
 
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 said:
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 ?
 
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
 
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
 
Back
Top