CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 query that does not include the specified expression

Print topic Send  topic

Author Message
Posted: 12/22/2002, 4:29 AM

I'm using ASP + templates, Access base and working on Bookstore example
(Verisign Tutorial).

Here is the problem: I added the item_quantity field in the items table. So
what I tried to do is update that field every time purchase is made. But I
keep getting error messages:
" You tried to execute a query that does not include the specified
expression 'item_quantity' as part of an aggregate function.

This is the Event Open code:
dim pnref
dim result
dim respmsg
pnref= getParam("pnref")
result = getParam("RESULT")
respmsg = getParam("RESPMSG")
if result = 0 then
cn.execute("insert into invoices (member_id, invoice_id) values (" &
Session("UserID") & ", '" & pnref & "')")
cn.execute("update items set items.item_quantity = sum (items.item_quantity
+ (orders.quantity)) where member_id = " & Session("UserID")&" and item_id=
items.item_id ")
cn.execute("insert into purchases (invoice_id, order_id, member_id, item_id,
quantity) select '" & pnref & "', order_id, member_id, item_id, quantity
from orders where member_id = " & Session("UserID"))
response.write "This transaction was not approved.<br> Please adjust your
payment details and try again."
end if

What am I doing wrong?


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.