ljhodgett
asked on
sql syntax error when communicating to an access database in vb.net
Hi,
I have the following sql syntax that talks to an access database: -
rs.Open("Select NetDelCost, TaxCost, sum(TaxCost + NetDelCost) as 'DeliveryNetttotal' , Sum(NetDelCost) as 'DeliveryGrossTotal' from products WHERE Sold = true ", conn)
it keeps coming up: -
You tried to execute a query that does not include the specified expression 'NetDelCost' as part of an aggregate function.
When I run it in vb.net.
What am I doing wrong please.
Many Thanks
Lee
I have the following sql syntax that talks to an access database: -
rs.Open("Select NetDelCost, TaxCost, sum(TaxCost + NetDelCost) as 'DeliveryNetttotal' , Sum(NetDelCost) as 'DeliveryGrossTotal' from products WHERE Sold = true ", conn)
it keeps coming up: -
You tried to execute a query that does not include the specified expression 'NetDelCost' as part of an aggregate function.
When I run it in vb.net.
What am I doing wrong please.
Many Thanks
Lee
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.