Este es el código:
Código:
El error lo dá en la linea de color, pero os aseguro ke esa ruta existe, que esta mal????<% if session("acceso")="correcto" then Set rs = Server.CreateObject("ADODB.Recordset") Set conn = Server.CreateObject("ADODB.Connection") conn.Open ("driver={SQL Server};server=osiris.servidoresdns.net;uid=qc355;pwd=arojas;database=qc355") sql="select * from tbl_suscripciones where forma_pago='Domiciliacion' order by N_Abonado" rs.open sql,conn,1,2 Set rs2 = Server.CreateObject("ADODB.Recordset") if not rs.eof then dim fs,fname set fs=Server.CreateObject("Scripting.FileSystemObject") set fname=fs.CreateTextFile("d:\xvrt\2dmayo.com\Html\naveart\admin\Domiciliaciones.txt",true) fecha=date() if instr(1,cstr(fecha),"/")=2 then fecha="0" & cstr(fecha) 'response.write("hola") end if emision=dateadd("d",2,fecha) if instr(1,cstr(emision),"/")=2 then emision="0" & cstr(emision) 'response.write("hola") end if fecha=replace(cstr(fecha),"/","",1,2) emision=replace(cstr(emision),"/","",1,2) fname.WriteLine("5180B81221541000" & fecha & " DOS DE MAYO DIMENSIONES GRAFICAS S.L 00080125 ") fname.WriteLine("5380B81221541000" & fecha & emision &"DOS DE MAYO DIMENSIONES GRAFICAS S.L 00080125931100284619 01 ") a=2 b=2 c=0 total=0 while not rs.eof a=a+1 b=b+1 c=c+1 sql2="select * from tbl_pagos where id='" & rs("nif") & "'" rs2.open sql2,conn,1,2 cadena="5680B81221541000" cadena = cadena & rs("NIF") for i=len(rs("NIF")) to 11 cadena = cadena & " " next nombre = rs("nombre") & " " & rs("apel") cadena = cadena & nombre for j=len(nombre) to 39 cadena = cadena & " " next cadena = cadena & rs2("entidad") & rs2("oficina") & rs2("control") & rs2("num_cuenta") importe = cstr(rs2("importe_domiciliacion")) & "00" total = total + cdbl(rs2("importe_domiciliacion")) for i=1 to 10 - len(importe) cadena = cadena & "0" next cadena = cadena & importe cadena = cadena & " Domiciliacion Ediciones Naveart.com " rs2.close rs.movenext fname.WriteLine(cadena) wend if len(cstr(a))=1 then parcial= "000" & a end if if len(cstr(a))=2 then parcial= "00" & a end if if len(cstr(a))=3 then parcial= "0" & a end if b=b+2 if len(cstr(b))=1 then total2= "000" & b end if if len(cstr(b))=2 then total2= "00" & b end if if len(cstr(b))=3 then total2= "0" & b end if total=cstr(total) & "00" total=strreverse(total) for i=len(total) to 9 total=total & "0" next total=strreverse(total) c=strreverse(c) for i=len(c) to 9 c=c & "0" next c=strreverse(c) fname.WriteLine("5880B81221541000 " & total & " " & c & "000000" & parcial & " ") fname.WriteLine("5980B81221541000 0001 " & total & " " & c & "000000" & total2 & " ") fname.Close set fname=nothing set fs=nothing %>
Gracias de antemano.