Ver Mensaje Individual
  #2  
Antiguo 20-05-2006
celades1 celades1 is offline
Miembro
 
Registrado: ago 2005
Posts: 116
Reputación: 19
celades1 Va por buen camino
Hola

Esto es un ejemplo

Código Delphi [-]
procedure leer_fichero(fitxer:string)
  Var F1 : TextFile;
  ch,fecha,hora,codigo:string;
begin
  AssignFile(F1,fitxer ); 
  Reset(F1) ;
  while not Eof(F1) do 
  begin
    ReadLN(F1, Ch);
    codigo:=copy(ch1,1,10);
    fecha:=copy(ch1,11,10);
    hora:=copy(ch1,21,10);
  end
  CloseFile( F1 );
end;

Luego transformas el string fecha a datetime y la hora al que tenga tu tabla
y pones el codigo necesario para insertar en tu tabla dentro del bucle while not Eof(F1)

En fin Saludos

Última edición por dec fecha: 20-05-2006 a las 18:37:25.
Responder Con Cita