Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/12/2008, 07:47
darkmcloud
 
Fecha de Ingreso: octubre-2007
Mensajes: 191
Antigüedad: 17 años, 6 meses
Puntos: 0
Variable de control de bucle 'For' no válida

Buenas amigos de foros del web....aqui estoy con una problemática....estoy diseñando un codigo y me aparece el siguiente error :

Variable de control de bucle 'For' no válida
/inventario/validar_factura.asp, línea 54, columna 5
for i=0 to UBound(vecTotal)

este es mi codigo :


Código asp:
Ver original
  1. <&#37;
  2.  
  3. if Not IsEmpty(Request("codigo")) then
  4.      codigo = Request("codigo")
  5. end if
  6.  
  7.  if Not IsEmpty(Request("detalle")) then
  8.      detalle = Request("detalle")  
  9. end if
  10.  
  11. if Not IsEmpty(Request("canti")) then
  12.      canti = Request("canti")
  13.      end if
  14.      
  15. if Not IsEmpty(Request("precio")) then
  16. precio = Request("precio")
  17. end if
  18.  
  19. if Not IsEmpty(Request("total")) then
  20. total = Request("total")
  21. end if
  22.  
  23.  
  24. set Cnn = Server.CreateObject("ADODB.Connection")
  25. set rs = Server.CreateObject ("ADODB.Recordset")
  26. Cnn.Open Session("cnx")
  27.  
  28. vecClav = split(request("codigo"),",")
  29. vecDesc = split(request("detalle"),",")
  30. vecCanti = split(request("canti"),",")
  31. vecPrec = split(request("precio"),",")
  32.  
  33.  
  34. for i=0 to UBound(vecClav)
  35. strSQL5= "select  ( '"&trim(vecPrec(i))&"' * '"&trim(vecCanti(i))&"' )  as multi "
  36.  
  37. set rs5 = Cnn.Execute(strSQL5)
  38.  
  39. multiplicar = rs5.Fields("multi")
  40.  
  41. vecTotal = split (multiplicar  ,",")
  42. for i=0 to UBound(vecTotal)
  43.  
  44. next
  45.  
  46.  
  47. strSQL= "update FACPVAL set detalle ='"&trim(vecDesc(i))&"', canti ='"&trim(vecCanti(i))&"', precio ='"&trim(vecPrec(i))&"', total ='"&trim(vecTotal(i))&"' where codigo = '"&trim(vecClav(i))&"' and folio ='5161904'"
  48.  
  49. set rs = Cnn.Execute(strSQL)
  50.  
  51. next
  52.  
  53.  
  54. %>

que podra ser ???
De antemano muchas gracias