Ver Mensaje Individual
  #12 (permalink)  
Antiguo 26/01/2006, 06:56
Avatar de chemita59
chemita59
 
Fecha de Ingreso: agosto-2005
Ubicación: Madrid
Mensajes: 107
Antigüedad: 19 años, 8 meses
Puntos: 0
Gracias a todos los que han contestado,

Aprovechando la circunstancia he actualizado dos tabla y todo ha funcionado perfectamente.

He introducido alguna variable de mas, pero con la unica intencion de clarificar el codigo.

Por si le vale a alguien:

' **************DECLARAMOS VARIABLE PARA ACTUALIZAR SITUACION DE P.G.R. ************
Dim v1, v2, v3, v4
Dim misql1, misql2
v1= "01"
v4= "02"
RSPLANES.MoveFirst
' Iniciamos el bucle para asignar los valores a las variables y modificar los valores de los campos de situacion del P.G.R.

Do while Not RSPLANES.EOF
v2= Trim(RSPLANES.Fields.Item("po18_orden"))
v3= Trim(RSPLANES.Fields.Item("po18_eliminada"))
If v3 = "00" then
misql1= "UPDATE PIRYPGR SET pgr_SITUACION = '"&v4&"' WHERE pir_orden = "&v2
DICEPGR.ActiveConnection.Execute(misql1)
misql2= "UPDATE PGO18 SET po18_eliminada = '"&v1&"' WHERE po18_orden = "&v2
RSPLANES.ActiveConnection.Execute(misql2)
End If
RSPLANES.MoveNext
Loop
RSPLANES.MoveFirst


Saludos.