chrisguk
Active member
- Joined
- Nov 20, 2011
- Messages
- 29
- Programming Experience
- Beginner
All I want is for my child detail to have unique records to each record in my parent detail. Please help?
Database is called: EMIDB
Dataset is called: EMIDBdataset.xsd
Within this dataset I have many tables with various primary and foreign keys.
The tables that I am talking about binding are as follows:
Table Name: Sites
Fields:
pkSitesID
Sitename
fkLocationName
fkStockNameID
My other table which has a relation is:
Table name: MeterProgram
Fields:
pkProgramMeterID
ProgramDetail
fkSitesID
The form:
Name: Sites.vb
I dragged in the designer the table from the dataset called tables in detail view to the form Sites.vb
I have the following adapters for this dataset: SitesBindingSource, SitesBindingNavigator and SitesTableAdapter
I then created a tab control and in page one I dragged in the designer view the table MeterProgram in.
This then created the following adapters: MeterProgramBindingSource and MeterProgramTableAdapter.
The parent = Sites
The Child = MeterProgram
In the properties of the SitesBindingSource it displays the following:
Datamember = Sites
DataSource = EMIDBdataset.xsd
In the Properties of MeterProgramBindingSource is displays the following:
Datamember = MeterProgram
DataSource = EMIDBDataset.xsd
I hit debug and the sites form is not displaying a one to many relationship with the fields from MeterProgram.
What have I done wrong.
Chris
Database is called: EMIDB
Dataset is called: EMIDBdataset.xsd
Within this dataset I have many tables with various primary and foreign keys.
The tables that I am talking about binding are as follows:
Table Name: Sites
Fields:
pkSitesID
Sitename
fkLocationName
fkStockNameID
My other table which has a relation is:
Table name: MeterProgram
Fields:
pkProgramMeterID
ProgramDetail
fkSitesID
The form:
Name: Sites.vb
I dragged in the designer the table from the dataset called tables in detail view to the form Sites.vb
I have the following adapters for this dataset: SitesBindingSource, SitesBindingNavigator and SitesTableAdapter
I then created a tab control and in page one I dragged in the designer view the table MeterProgram in.
This then created the following adapters: MeterProgramBindingSource and MeterProgramTableAdapter.
The parent = Sites
The Child = MeterProgram
In the properties of the SitesBindingSource it displays the following:
Datamember = Sites
DataSource = EMIDBdataset.xsd
In the Properties of MeterProgramBindingSource is displays the following:
Datamember = MeterProgram
DataSource = EMIDBDataset.xsd
I hit debug and the sites form is not displaying a one to many relationship with the fields from MeterProgram.
What have I done wrong.
Chris