D
Dirk W
in my app I have two tables, which are connected with a datarelation.
Now I want to include a new datacolumn in the master table with an
expression that shows the number of rows in the detail table. My idea
was to simply count over the ID column of the detail table which is of
type GUID.
dsCard.Relations.Add("relLesson_LessonCard",
dsCard.Tables["Lesson"].Columns["ID"],
dsCard.Tables["LessonCard"].Columns["IDLession"]);
// Add a column to Lesson with the number of child rows
dsLCard.Tables["Lesson"].Columns.Add("NoCards", typeof(int),
"count(Child(relLesson_LessonCard).ID)");
I get a dataexception 'Invalid usage of aggregate function Count()
andf Type: GUID'.
Is there any possibility to count a column of type GUID (I don't have
any other column types in this table)? If not, how should I solve this
problem?
Thanks
Dirk
Now I want to include a new datacolumn in the master table with an
expression that shows the number of rows in the detail table. My idea
was to simply count over the ID column of the detail table which is of
type GUID.
dsCard.Relations.Add("relLesson_LessonCard",
dsCard.Tables["Lesson"].Columns["ID"],
dsCard.Tables["LessonCard"].Columns["IDLession"]);
// Add a column to Lesson with the number of child rows
dsLCard.Tables["Lesson"].Columns.Add("NoCards", typeof(int),
"count(Child(relLesson_LessonCard).ID)");
I get a dataexception 'Invalid usage of aggregate function Count()
andf Type: GUID'.
Is there any possibility to count a column of type GUID (I don't have
any other column types in this table)? If not, how should I solve this
problem?
Thanks
Dirk