Hi all,
I have a products table that I would like to update when an order comes in here is the code
set rsUpdateQuantity = Server.CreateObject("ADODB.Recordset")
rsUpdateQuantity.Open "SELECT * FROM products WHERE orderID = " _
& intOrderID, Conn, adOpenStatic, adLockOptimistic, _
adCmdTable
if rsUpdateQuantity.numInStock > 1 then
numInStock - 1
else
DELETE
end if
rsUpdateQuantity.Update
rsUpdateQuantity.Close
It is currently throwing this error
Syntax error in FROM clause.
Any help is appreciated
I have a products table that I would like to update when an order comes in here is the code
set rsUpdateQuantity = Server.CreateObject("ADODB.Recordset")
rsUpdateQuantity.Open "SELECT * FROM products WHERE orderID = " _
& intOrderID, Conn, adOpenStatic, adLockOptimistic, _
adCmdTable
if rsUpdateQuantity.numInStock > 1 then
numInStock - 1
else
DELETE
end if
rsUpdateQuantity.Update
rsUpdateQuantity.Close
It is currently throwing this error
Syntax error in FROM clause.
Any help is appreciated