CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 query that does not include the specified expression

Print topic Send  topic

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

Hi
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"))
else
response.write "This transaction was not approved.<br> Please adjust your
payment details and try again."
end if

What am I doing wrong?
Thanks
Miron



   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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