I made a database (http://users.skynet.be/fc042048/Pizza.jpg) in Access
which I want to use via typed datasets on my website. Problem is, if I i.e.
want to edit the datatable "Pizza" in a gridview, I get the error "Can't
delete or update the record because there are related records in the
datatable "PizzaOnderdelen" (means Pizza Ingredients).
What do I have to do to update the table ? Do I need to adjust my dataset
file (contains only the table 'Pizza") or do I have to change my VB code (I
made a Pizza object and update/delete/insert methods for the Pizza table) ?
(Here's the source code: Solution
(http://users.skynet.be/fc042048/Pizza%20(solution).rar) and Aspx files
(http://users.skynet.be/fc042048/Pizza%20(aspx%20files).rar))
Bauhaus.
Bauhaus - 11 May 2008 17:39 GMT
Basically, the problem is this: the field PizzaNr is a primairy key in 3
tables (Pizza, PizzaOnderdelen and PizzaPrijs). If PizzaNr was a foreign key
in the other 2 tables, then it wouldnt be a problem.
So I have to adjust my VB code so that the 3 tables are updated together,
but how do I do that ? Could I use an SQL statement ?