CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 custom insert? what is wrong with this code!!

Print topic Send  topic

Author Message
charles
Posted: 02/15/2004, 2:29 PM

I am having problems with this custom insert code for updating product
inventory after a transaction has taken place on the the order_items table.
There is no error message but no updates takes place either.
here is my code for the after execute update event
Dim SQL
Dim Connection
Dim ErrorMessage

SQL = "update products "&_
"set unitsinstock=(products.unitsinstock-order_items.quantity)"&_
"from products,order_items"&_
"where products.product_id = order_items.product_id"
Set Connection = New clsDBConnection1
Connection.Open
Connection.Execute(SQL)
ErrorMessage = CCProcessError(Connection)
Connection.Close
Set Connection = Nothing
On Error Goto 0


Add new topic Subscribe to topic   


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.