这样的用 filestream最好,不知道你为什么用 memorystream?? type PInformationDataRec = ^TInformationDataRec;TInformationDataRec = packed record Brith_Date: TDateTime; Sex,Name,Adress,Phonenumber: array[0..200]of char; end;//var pinfo: PInformationDataRec ;procedure TForm1.btn1Click(Sender: TObject); //saveToFilevar pinfo: PInformationDataRec ;fs:TFileStream;begin // getmem(pinfo,SizeOf(TInformationDataRec)); pinfo.Brith_Date :=Now; StrCopy(pinfo.Sex ,'m'); //pinfo.Sex :='m'; StrCopy(pinfo.Name ,'张三'); //pinfo.Name :='张三'; StrCopy(pinfo.Phonenumber ,'11111111'); StrCopy(pinfo.Adress ,'上海'); fs:=TFileStream.Create('c:/1.txt',fmOpenWrite ) ; //没有考虑原来有记录,请你自己处理 fs.WriteBuffer(pinfo,SizeOf(TInformationDataRec)) ; fs.Free ;end;procedure TForm1.btn2Click(Sender: TObject); //readFromFilevar pinfo: PInformationDataRec ;fs:TFileStream;begin getmem(pinfo,SizeOf(TInformationDataRec)); fs:=TFileStream.Create('c:/1.txt',fmOpenRead ) ; //只读了一条记录,其他请你自己处理 fs.Seek(0,soFromBeginning); fs.read(pinfo,SizeOf(TInformationDataRec)) ; ShowMessage(pinfo.Name ); ShowMessage(pinfo.Adress ); fs.Free ;end;建议:最好不要在record里用string类型,字符串就用 char数组