Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/11/2005, 10:53
Avatar de El_Metallick
El_Metallick
 
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 22 años, 5 meses
Puntos: 16
No se se lo que quieres es algo asi

Modificados
Código:
set FSO = Server.CreateObject("Scripting.FileSystemObject")

'Condición para saber si existe el fichero
If fso.FileExists (Server.MapPath("inc/editados.txt")) Then 
   set oFich = FSO.OpenTextFile(Server.MapPath("inc/editados.txt"), 8)
   'Escribimos la linea nueva
   oFich.WriteLine ("" & now & " Se cambió " & categoria1 & " " & marca1 & " " & modelo1 & " " & descripcion1 & " " & precio1 & " por " & categoria & " " & marca & " " & modelo & " " & descripcion & " " & precio & "")
   oFich.Close
else
   'Se crea el fichero
   set oFich = FSO.CreateTextFile ( Server.MapPath("inc/editados.txt"), True )
   set oFich = FSO.OpenTextFile(Server.MapPath("inc/editados.txt"), 8)
   'Escribimos la linea nueva
   oFich.WriteLine ("" & now & " Se cambió " & categoria1 & " " & marca1 & " " & modelo1 & " " & descripcion1 & " " & precio1 & " por " & categoria & " " & marca & " " & modelo & " " & descripcion & " " & precio & "")
   oFich.Close
end if
Isertados
Código:
set FSO = Server.CreateObject("Scripting.FileSystemObject")

'Condición para saber si existe el fichero
If fso.FileExists (Server.MapPath("inc/insertados.txt")) Then 
   set oFich = FSO.OpenTextFile(Server.MapPath("inc/insertados.txt"), 8)
   'Escribimos la linea nueva
   oFich.WriteLine ("" & now & " Se agregó " & categoria & " " & marca & " " & modelo & " " & descripcion & " " & precio & "")
   oFich.Close
else
   'Se crea el fichero
   set oFich = FSO.CreateTextFile ( Server.MapPath("inc/insertados.txt"), True )
   set oFich = FSO.OpenTextFile(Server.MapPath("inc/insertados.txt"), 8)
   'Escribimos la linea nueva
   oFich.WriteLine ("" & now & " Se agregó " & categoria & " " & marca & " " & modelo & " " & descripcion & " " & precio & "")
   oFich.Close
end if
Borrados
Código:
set FSO = Server.CreateObject("Scripting.FileSystemObject")

'Condición para saber si existe el fichero
If fso.FileExists (Server.MapPath("inc/borrados.txt")) Then 
   set oFich = FSO.OpenTextFile(Server.MapPath("inc/borrados.txt"), 8)
   'Escribimos la linea nueva
   oFich.WriteLine ("" & now & " Se borró " & rs("categoria") & " " & rs("marca") & " " & rs("modelo") & " " & rs("descripcion") & " " & rs("precio") & "")
   oFich.Close
else
   'Se crea el fichero
   set oFich = FSO.CreateTextFile ( Server.MapPath("inc/borrados.txt"), True )
   set oFich = FSO.OpenTextFile(Server.MapPath("inc/borrados.txt"), 8)
   'Escribimos la linea nueva
   oFich.WriteLine ("" & now & " Se borró " & rs("categoria") & " " & rs("marca") & " " & rs("modelo") & " " & rs("descripcion") & " " & rs("precio") & "")
   oFich.Close
end if
Espero que sea eso saludos y suerte
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!