Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/11/2004, 09:45
fallen_angel
 
Fecha de Ingreso: octubre-2003
Mensajes: 49
Antigüedad: 21 años, 6 meses
Puntos: 0
Pero el error que te despliega es un poco raro, revise la sintaxis y esta correta, mira te adjunto el codigo que utilizo yo para esate tipo de recordset.

Cita:
SQL2="SELECT SUM(TOT_NET) AS RESULTADO1, SUM(TOT_BRU) AS RESULTADO2 FROM monitor WHERE (fec_vta >= CONVERT(DATETIME, '"&PERIODO1&"', 102)) AND (fec_vta <= CONVERT(DATETIME, '"&PERIODO2&"', 102)) AND COD_LOC="&COD_LOC&" AND TIP_DOC=25 "
SET RS2=Server.CreateObject("ADODB.Recordset")
RS2.Open SQL2, CONN2, 1, 2
IF NOT RS2.EOF THEN
TOT_BOL_NET=CDBL(RS2.FIELDS("RESULTADO1"))+TOT_BOL _NET
TOT_BOL_BRU=CDBL(RS2.FIELDS("RESULTADO2"))+TOT_BOL _BRU
END IF
RS2.CLOSE
donde conn2 es la conexion y rs2 el recordset, espero que sea de utilidad