Hi,
I appreciate your response, and I could not agree with you
more. I have purchased a couple of books on vb.net, and
I'm going to be doing exactly what you recommended. My
development progression is not based on using this
wizard... I am simply making a point on the principle more
than anything at this point (and in my view the question
applies to whether it's done in code or not). Again, I
appreciate your response very much and I agree with you
100% (and I will follow-up by posting the question in the
ado.net section.
Also, you made the point about a dataset containing more
than one table, but I believe the problem is based in the
adapter... not the dataset. Take the text below that I
put in from an article. Based on this text, it appears
that one adapter (whether in code or otherwise) should be
used per table, and then the dataset pulls in the multiple
tables through muliple adapters... NOT one adapter for
multiple tables.
Data adapters and Related Tables:
"An implication of having separate tables in the dataset
is that a data adapter typically does not reference SQL
Commands or stored procedures that join tables. Instead,
information from the related tables is read separately
into the dataset by different adapters. Then a
DataRelation object is used to manage constraints between
the dataset tables (such as cascading updates) and to
allow you to navigate between related master and child
records."
So again, the point is that while the above makes sense,
it does not answer the question as to why the data adapter
allows for adding multiple tables. The question is just
bothering me more than anything else... I'm not hinging me
development experience on it :o) I'm sure that writing
this in code will enlighten the issue, but it would be
nice to know what the deal is with the adapter anyway.
Thanks a lot!!
-----Original Message-----
Rick,
DataSet's are supposed to be able to contain
one or more tablesand relations etc, that is why its called a 'Set'. I
would recommend thatyou dont use the wizards except for things like getting
the right connectionstrings and parameterised lists etc.
Spend some time looking at how the wizard places the code
on the form andthen try to do this manually. You will find that you will
learn a lot morethis way and also have much more control over your data.
I would suggest that you go to the adonet newsgroup for
more help as thereare specialists operating there who are more likely to
spend time answeringdetailed questions.
Best Regards - OHM
Rick wrote: The data adapter wizard allows you to add more than one
table, but that doesn't seem to work right when setting
up a dataset. Some of the documentation I have read states
that only one table should be selected per data adapter,
and then you use a DataRelation object to pull join them
together. Okay, if that's the case then fine, but why
would the data adapter allow you to add more than one
table if this is not how it is supposed to work. If only
one table should be used, then the program should only
allow the addition of one table.
I'm sure I'm missing out on something here, but nothing
I have read explains it. I'm kinda new to vb.net, so I
hope someone can provide an explanation or reference to an
article on this.
Any help would be greatly appreciated.
Thanks,
Rick
.