E
elixxir
Hi,
I'm relatively new to ADO.NET and the issue that I'm facing at the
moment is that I have an OleDbDataAdapter that JOINs two tables via the
Query Builder.
For example, I have two Customers and Bookings tables and I'm creating
a CustomerBookings DataTable that contains fields from both Customers
(such as name etc) and fields from Bookings (date, time, booking type,
etc).
Now, this all gets displayed in a DataGrid and I need to be able to
allow the user to Insert/Update this data back up to the DB. Only the
Bookings table in the DB will need to be changed by this.
Obviously, the Query Builder refuses to generate Insert/Update code
because it complains about multiple tables.
I've seen this article
http://www.knowdotnet.com/articles/datarelation.html which suggests to
use DataRelations, but I don't understand how this can be done. I've
used DataRelations before but only to create Master/Detail type
relations.
I've also been able to manually code updates/inserts of the relevant
columns but I'm sure there must be a more elegant way.
I'd really appreciate if someone can let me know what's the best way to
do this type of thing. Links to articles/books appreciated
Paul
I'm relatively new to ADO.NET and the issue that I'm facing at the
moment is that I have an OleDbDataAdapter that JOINs two tables via the
Query Builder.
For example, I have two Customers and Bookings tables and I'm creating
a CustomerBookings DataTable that contains fields from both Customers
(such as name etc) and fields from Bookings (date, time, booking type,
etc).
Now, this all gets displayed in a DataGrid and I need to be able to
allow the user to Insert/Update this data back up to the DB. Only the
Bookings table in the DB will need to be changed by this.
Obviously, the Query Builder refuses to generate Insert/Update code
because it complains about multiple tables.
I've seen this article
http://www.knowdotnet.com/articles/datarelation.html which suggests to
use DataRelations, but I don't understand how this can be done. I've
used DataRelations before but only to create Master/Detail type
relations.
I've also been able to manually code updates/inserts of the relevant
columns but I'm sure there must be a more elegant way.
I'd really appreciate if someone can let me know what's the best way to
do this type of thing. Links to articles/books appreciated
Paul