Ver Mensaje Individual
  #4  
Antiguo 13-05-2004
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Reputación: 25
__cadetill Va por buen camino
Supongo que el amigo Román se referiría a algo así

Código Delphi [-]
var
  F: TextFile;
  L: TStrings;
  str: string;
begin
  L := TStringList.Create;
  try
    if not FileExists('Fichero') then
      raise Exception.Create('Fichero innexistente');

    AssignFile(F, 'Fichero');
    Reset(F);
    while not EOF(F) do
    begin
      Readln(F, str);
      if CadenaCorrecta(str) then
        Añadir_A_Access(str)
      else
        L.Add(str);
    end;
    CloseFile(F);
    if L.Count > 0 then
      L.SaveToFile('c:\errores.txt');
  finally
    FreeAndNil(L);
  end;
end;
La función CadenaCorrecta y el procedimiento Añadir_A_Access ya te los dejo implementar a ti
Responder Con Cita