Typed DataSet Column Refering to Relationship

I have seen examples and samples such that you can show the Related Tables Data in the current Table.

The syntax is something like:
' add a new calculated column to the Categories table, with the number of child 
' products
ds.Tables("Categories").Columns.Add("ProductsCount", GetType(Integer), _
    "Count(Child(CatProducts).ProductID)")


However, whenever I try this or any other such expression, I get an InvalidCast Exception in a Typed DataSet.  

I want to know if anyone has tried this and has it worked
Also which is better, to show the value in this manner or do a join in the SQL statement.

Any help will be great.

--Rythm


Answer this question

Typed DataSet Column Refering to Relationship

  • Typed DataSet Column Refering to Relationship