ADO.NET 2.0 - Central approach

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

Guest

I don't seem to grasp the central approach of the data source window.
From this central data-window you drag and drop tables or fields on forms
and/or controls. Dataset, tableadapter and other components are created. The
auto-generated code in the load statement fills the newly created
datatable(s).
But this functionality is also executed even when you use 2 different forms
that need to show the same data. Let's work with Customers.
On form1 is a new customer added and form2 isn't aware of the new record,
because it has a different dataset and tableadapter.
Opening form1 executes the fill-method. The same happens when form2 is
created, although the Customers-records are already present on the
client-machine when form1 opened.
I can link the controls on Form2 in code to the dataset, etc. from form1,
but then I lose the userfriendlyness of dragging and dropping and configuring
in design-time.
Am I overseeing something here?

Many thanks in advance for your answer(s).
 
Dirk,

In my opinion did you ask almost the same question in this newsgroups 3
hours ago, got two different answers and are it asking now almost the same
new.

Some reason?

Cor
 
Yes

I'll ask it again.
Why can't I use the same datatable and tableadapter in more then one form if
the sourcetable is the same on both forms.
Seperate components mean seperate validations, seperate fills, updates, etc.
I can code the databindings, but then I lose the flexibility of dragging,
dropping, configuring a component in design-time.

Greetings
 
'Flexibility' of using the wizards? I would say you are losing the
flexibility *by* using the wizards.

I am of the opinion that they are only to be used as learning tools and are
not suited for production applications.

In any case, as Cor pointed out, your question already got answered. Did
you not like the first answers? It's not like you can just keep asking until
you get the answers you like.
 
Back
Top