Buenos días compañeros del foro, mi consulta es la siguiente : Hasta ahora
he utilizado la siguiente rutina para manipular archivos planos,
Dim fs04
Dim f04
Dim ts04
Set fs04 = CreateObject("Scripting.FileSystemObject")
If Trim(Dir("c:\" & Flota)) = "" Then
Set f04 = fs04.CreateTextFile("c:\" & Flota, True)
Set f04 = fs04.GetFile("c:\" & Flota)
Set ts04 = f04.OpenAsTextStream(8, -2)
ts04.writeline "comienzo"
ts04.writeline Trim(Flota) & ";" & Trim(Placa) & ";" &
Trim(IdVehiculo) & ";" _
& Trim(UltimaFechaX) & ";" & Trim(Hora) & ";" & Trim(Latitud) & ";"
_
& Trim(Longitud) & ";" & Trim(Velocidad) & ";" _
& Trim(AUbicacion) & ";" & Trim(Direccion) & ";" & Trim(Altitud)
ts04.Close
Set f04 = Nothing
Set fs04 = Nothing
Set ts04 = Nothing
Else
Set f04 = fs04.GetFile("c:\" & Flota)
Set ts04 = f04.OpenAsTextStream(8, -2)
ts04.writeline Trim(Flota) & ";" & Trim(Placa) & ";" &
Trim(IdVehiculo) & ";" _
& Trim(UltimaFechaX) & ";" & Trim(Hora) & ";" & Trim(Latitud) & ";"
_
& Trim(Longitud) & ";" & Trim(Velocidad) & ";" _
& Trim(AUbicacion) & ";" & Trim(Direccion) & ";" & Trim(Altitud)
ts04.Close
Set f04 = Nothing
Set fs04 = Nothing
Set ts04 = Nothing
End If
crearlos, eliminarlos, leer linea por linea, agregar linea a linea pero me
parece que no es lo más apropiado y ultimamente me esta dando un error de
acceso denegado cuando intento borralo (error 70) al cual le doy ok. y
continua sin ningun problema.
La pregunta es existe otra manera con la que pueda realizar estas mismas
operaciones pero con otras intrucciones. Muchas de antemano.
Leer las respuestas