Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/03/2009, 12:56
Rossanalie
 
Fecha de Ingreso: enero-2009
Mensajes: 38
Antigüedad: 15 años, 3 meses
Puntos: 0
Error al imprimir variable

Hola, que tal, tengo un problema para imprimir una variable que recojo de la base de datos. La linea con problemas esta en negrita quiero imprimir el valor del mes y el periodo en el archivo xml.


If rs.EOF = True And rs.BOF = True Then
Else
Do While rs.EOF = False
rs.MoveFirst
mes = rs.Fields("periodo_mes").Value
año = rs.Fields("periodo_año").Value
rif = rs.Fields("rif_contribuyente").Value
factura = rs.Fields("n_factura").Value
Control = rs.Fields("n_control").Value
monto = rs.Fields("monto_retencion").Value
porcentaje = rs.Fields("porcentaje").Value

'abrimos el archivo con FSO para escribir el documento xml
Set FSO = CreateObject("Scripting.FileSystemObject")
Set ofich = FSO.CreateTextFile(rutacompleta, True)

variable = "<?xml version =" & Chr(34) & "1.0" & Chr(34) & " encoding =" & Chr(34) & "utf-8" & Chr(34) & "?>"
ofich.writeline (variable)
ofich.writeline ("<RelacionRetencionesISRL RifAgente=" & Chr(34) & "J002938897" & Chr(34) & " Periodo=" & Chr(34) & & mes & & año & & Chr(34) & ">")
ofich.Close
Set ofich = Nothing
rs.MoveNext
Loop
rs = Nothing
End If