DataSet Usage

T

Tom Woods

I've been struggling with the best way to use a DataSet in the application
I'm laying out. To start, I'm new with DataSet's and MS SQL. I'll start by
describing what my goals are:

I have a form that will have a list (grid) of items from Orders. This list
will be docked to the left side of my form. I want to allow the user to
create/view multiple orders using MDI. So when they click on an item in the
list/grid, it will update the focused order form. If the create a new
order, it will create a new Order from (child mdi). They could even be
viewing multiple orders.

From the standpoint of design. What is the best way to setup my DataSet?
Should I have multiple - one for the list and one for each order form? Or,
can just one be used?

When it gets to TableAdapters, can you only have one? I thought about
having the list/grid use one Fill method and the forms use another. Can
this be done?

As you can see, I'm a little lost. Can anyone shed a little light?

TIA,

Tom
 
B

Brian Gideon

I've been struggling with the best way to use a DataSet in the application
I'm laying out. To start, I'm new with DataSet's and MS SQL. I'll start by
describing what my goals are:

I have a form that will have a list (grid) of items from Orders. This list
will be docked to the left side of my form. I want to allow the user to
create/view multiple orders using MDI. So when they click on an item in the
list/grid, it will update the focused order form. If the create a new
order, it will create a new Order from (child mdi). They could even be
viewing multiple orders.

From the standpoint of design. What is the best way to setup my DataSet?
Should I have multiple - one for the list and one for each order form? Or,
can just one be used?

When it gets to TableAdapters, can you only have one? I thought about
having the list/grid use one Fill method and the forms use another. Can
this be done?

As you can see, I'm a little lost. Can anyone shed a little light?

TIA,

Tom

With the parent-child behavior in the application it would be nice to
use one DataSet that contains all of the tables that way you can use
the relationships you build into the DataSet to easily retrieve the
corresponding child rows from a single parent row. It works
especially well when using strongly-typed datasets.
 
T

Tom Woods

At this point, I think I'm on track, but maybe not...

The child form I'm creating has a it's own DataSet. When I added the
DataBindings to the form, it automatically created the TableAdapter. The
TableAdapter seems to access the same DataSet I see in the DataSet Desiner -
it has the same Queries. I can now set the filter on the form to one
specific record and each child form shows a different record.

Can anyone see a problem with this approach?

Thanks,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top