Now I really dont know whats wrong, please help me.

 

The writting code:

 

========================================

procedure TForm1.Button1Click(Sender: TObject);

var

  archivo: File of String;

  cadena: String;

  

begin

  cadena := Edit1.Text;

  ShowMessage(cadena);

  System.Assign(archivo, 'archivo.dat');

  System.Rewrite(archivo);

  Write(archivo, cadena);

  System.Close(archivo);

end;

========================================

 

The Reading code (Another app):

 

========================================

procedure TForm1.Button1Click(Sender: TObject);

var

  archivo: file of string;

  cadena: string;

 

begin

  System.Assign(archivo, 'archivo.dat');

  System.Reset(archivo);

  read(archivo, cadena);

  System.Close(archivo);

  

  Edit1.Text := cadena;

 

end;  

========================================

 

When I run the writting app, it seems to work, the archivo.dat file is
created. But when I run the Reading app, and press the read button, it
apperas an error message who say something about Access violation.

 

Please help! Have mercy!!!!

 

Regards, 

 

German

Reply via email to