Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / May 2008



Tip: Looking for answers? Try searching our database.

ASP/ADO/VB.NET: How to update multiple datatables with typed datasets ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bauhaus - 10 May 2008 17:56 GMT
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 ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.