Question insert and update on table adaptor with three tables

Bru617

New member
Joined
Apr 22, 2011
Messages
1
Programming Experience
Beginner
Hi Everyone, pretty new to ado and vb.net and im having trouble with a small assignment !!

I have a access database within my project which has three related tables within my dataset with each having its on tableadaptor, example below:
tblApprovedProducts
(PK)ProductID
description
price
perUnit

tblSiteProducts
(PK)ProductID
(PK)siteID
quantityOnStock
location

tblSites
(PK)siteID
siteName
siteAddress
postcode

Relationships : tblApprovedProducts (1:M) tblSiteProducts (M:1) tblSites




I have created a new table adaptor which has siteID, siteName, productID, description, quantityOnStock and location, which I have set to qury siteID as =? in the query builder.
What I am trying to do is bring a tab control on the form, tab1 showing single view (details view) of siteID, siteName, productID, description, quantityOnStock and location. The user would select siteID via a combobox on this tab and query from the tableadaptor would populate all for that site. In tab2 it would show all the same fields but in a datagrid, which would be read only.
I would like a way to be able to insert update and delete as needed from the tab1 single view control and this is causing me the problem, as because of the joins in the new tableaptor it does not bring in the insert, update delete commands.

Can anyone give me any help or guidance :confused:

Cheers

Bru
 
Last edited:
Back
Top