firebirds98 0 Newbie Poster

I have seen a few of these threads but none have been able to help me.

The error is :
fld_CPRDiscount is neither a DataColumn nor a DataRelation for table Table.

Here is my SQL Code:

tbl_BidQuotas.fld_RespondentsNeeded AS fld_Needed,
ISNULL(((tbl_BidQuotas.fld_CostPerRecruit) - Convert(money,(tbl_BidQuotas.fld_CostPerRecruit * tbl_Bids.fld_RecruitingDiscount))), 0) AS 'fld_CPRDiscount',

my ASPX Code which is in a datalist

<td width="125px" align="left" class=labelnormal><%#Container.DataItem("fld_Needed")%></td> 
<td width="100px" align="left" class=labelnormal>$<%#Math.Round(Container.DataItem("fld_CPRDiscount"), 2)%></td>

my Code Behind Code which is in a datalist ItemDataBound

sngCPRDiscount += (e.Item.DataItem("fld_CPRDiscount") * e.Item.DataItem("fld_Needed"))

When I change e.Item.DataItem("fld_CPRDiscount") to e.Item.DataItem(1) it works fine. I just dont understand what the problem is. Any help is greatly appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.