473,568 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculated columns that refer to relationships

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("Cate gories").Column s.Add("Products Count", GetType(Integer ), _
"Count(Child(Ca tProducts).Prod uctID)")

http://www.devx.com/vb2themax/Tip/18863

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
0 978

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5381
by: Miguelito Bain | last post by:
hi everybody. i'm trying to find out what you can and can't do with/in calculated fields. any help, pointers, and/or advice would be greatly appreciated. i'm a newbie, but i want to learn, and i've tried a lot before posting. here's my situation. i have a simple form with dates on it. i have an indate and outdate
1
1303
by: Sean | last post by:
I have a table I am using to load a DataSet.DataTable to display data on a DataGrid. I have a Column called StartTime that is a DateTime and I have a column called Duration that is an Int32, that contains minutes. I want to create a calculated column that adds the minutes to the StartTime and is called EndTime. Any thought on how to go about doing...
2
6002
by: Unforgiven | last post by:
Hello All, I have the following query... SELECT Demographics.Full_Name, Demographics.Year_of_birth, Status.Status_OK, SUM(2004 - Demographics.Year_of_birth) AS Age FROM Demographics INNER JOIN Status ON Demographics.PrimaryKey = Status.PrimaryKey
8
31523
by: Paul Hunter | last post by:
I am new to databases and thus to Access. I have a situation where I am trying to figure out how to key some tables I am working with. Consider that I have a database of my own records which are invoices I work on. These invoices are from four companies with their own invoice numbers. So, I cannot key by invoice number because there is a...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.