B
byahne
I am new to ADO.Net. I'm currently attempting to prototype an ASP.Net
Solution for a customer. I have the following scenario and I'm not
sure what the "best" direction is...
We have two tables that have a 1 to 1 relationship. We have decided
to use strongly-typed datasets for a variety of reasons. The
application needs to access / display / allow edit of information in
both tables simultaneously preferrably through a GridView.
I have tried a few approaches including:
- creating stored procedures for insert, update, delete, and select
that joins the two tables and appropriate update of data in the
database. While this approach worked, it was somewhat clunky to
implement and my customer has a desire to avoid stored procedures for
all of their data maintenance activities.
- creating a DataSet containing the two tables associated with a
Relation. The issue we have here is that we are unable to bind a
GridView to both tables simultaneously and edit both sets of data
simultaneously.
- created a single DataAdapter that performs a select with the
appropriate join. I then attempted to create a customer InsertCommand
that would insert into two different tables, however the designer
indicated it couldn't parse the query and wouldn't let me complete the
action.
My question is, what is the "best practice" approach for implementing
functionality like this in a strongly-typed dataset?
Any guidance would be appreciated.
Solution for a customer. I have the following scenario and I'm not
sure what the "best" direction is...
We have two tables that have a 1 to 1 relationship. We have decided
to use strongly-typed datasets for a variety of reasons. The
application needs to access / display / allow edit of information in
both tables simultaneously preferrably through a GridView.
I have tried a few approaches including:
- creating stored procedures for insert, update, delete, and select
that joins the two tables and appropriate update of data in the
database. While this approach worked, it was somewhat clunky to
implement and my customer has a desire to avoid stored procedures for
all of their data maintenance activities.
- creating a DataSet containing the two tables associated with a
Relation. The issue we have here is that we are unable to bind a
GridView to both tables simultaneously and edit both sets of data
simultaneously.
- created a single DataAdapter that performs a select with the
appropriate join. I then attempted to create a customer InsertCommand
that would insert into two different tables, however the designer
indicated it couldn't parse the query and wouldn't let me complete the
action.
My question is, what is the "best practice" approach for implementing
functionality like this in a strongly-typed dataset?
Any guidance would be appreciated.