J
jaYPee
I have tried almost everything I know but still I can't find a way on
how to resolve this problem.
I'm using ImportRow to copy some record from 1 table to another table.
Here are my code that doesn't work:
Dim copyRows() As DataRow =
DsStudentCourse1.Tables("Course").Select("CourseCode = 'AUTO 1'")
Dim custTable As DataTable =
DsStudentCourse1.Tables("SchYrSemCourseJoin")
Dim copyRow As DataRow
For Each copyRow In copyRows
custTable.ImportRow(copyRow)
Next
Me.DataGrid2.DataSource = DsStudentCourse1
Me.DataGrid2.DataMember =
"Students.StudentsSchYrSem.SchYrSemSchYrSemCourseJoin"
My problem here I think is in the DataGrid2.DataMember. Because if I
changed it w/ "SchYrSemCourseJoin" (which is the name of the
grandchild table) the code works fine. But of course I can't use it
since ""SchYrSemCourseJoin" is related from SchYrSem Table.
Here's the scenario.
I have three tables:
Students Table
SchYrSem Table
SchYrSemCourseJoin Table
SchYrSem is related from Students Table
SchYrSemCourseJoin is related from SchYrSem Table
The relation name of Students and SchYrSem is "StudentsSchYrSem"
The relation name of SchYrSem and SchYrSemCourseJoin is
"SchYrSemSchYrSemCourseJoin"
So therefore in order to view the related records of SchYrSem the
datamember of datagrid2 is
"Students.StudentsSchYrSem.SchYrSemSchYrSemCourseJoin"
how to resolve this problem.
I'm using ImportRow to copy some record from 1 table to another table.
Here are my code that doesn't work:
Dim copyRows() As DataRow =
DsStudentCourse1.Tables("Course").Select("CourseCode = 'AUTO 1'")
Dim custTable As DataTable =
DsStudentCourse1.Tables("SchYrSemCourseJoin")
Dim copyRow As DataRow
For Each copyRow In copyRows
custTable.ImportRow(copyRow)
Next
Me.DataGrid2.DataSource = DsStudentCourse1
Me.DataGrid2.DataMember =
"Students.StudentsSchYrSem.SchYrSemSchYrSemCourseJoin"
My problem here I think is in the DataGrid2.DataMember. Because if I
changed it w/ "SchYrSemCourseJoin" (which is the name of the
grandchild table) the code works fine. But of course I can't use it
since ""SchYrSemCourseJoin" is related from SchYrSem Table.
Here's the scenario.
I have three tables:
Students Table
SchYrSem Table
SchYrSemCourseJoin Table
SchYrSem is related from Students Table
SchYrSemCourseJoin is related from SchYrSem Table
The relation name of Students and SchYrSem is "StudentsSchYrSem"
The relation name of SchYrSem and SchYrSemCourseJoin is
"SchYrSemSchYrSemCourseJoin"
So therefore in order to view the related records of SchYrSem the
datamember of datagrid2 is
"Students.StudentsSchYrSem.SchYrSemSchYrSemCourseJoin"