Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/01/2003, 12:26
Avatar de bakanzipp
bakanzipp
 
Fecha de Ingreso: noviembre-2001
Ubicación: santiago de shilli
Mensajes: 2.554
Antigüedad: 23 años, 5 meses
Puntos: 0
pasa los valores a enteros y haz la resta antes de hacer el update

Código:
Dim nuevo_valor

strSQL = "select cantidad from Producto where codigo = "&codigo&" ; "

SET Obj_RS = Obj_Conn.Execute(strSQL)

IF NOT Obj_RS.EOF THEN
 nuevo valor = Cint(Request.Form ("Cantidad")) - Cint(Obj_Rs("cantidad"))

SQL = "update Producto set cantidad="& nueva_cantidad &" where codigo = "& Obj_RS("codigo") & " ;"
...
...