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
|
|
|
|