凌
凌云景
Unregistered / Unconfirmed
GUEST, unregistred user!
我往一个文件里面写一个整形值:65535
可是无法写对。代码如下:
function TTableStream.FieldValueByName(const index: integer;
buffer: Variant): boolean;
var
selField : TField;
begin
Result := True;
try
selField := Fields.GetField(index);
FRecStream.Seek(selField.pos,soFromBeginning);
FRecStream.Write(buffer,SizeOf(selField.length));
except
Result := False;
end;
end;
可是无法写对。代码如下:
function TTableStream.FieldValueByName(const index: integer;
buffer: Variant): boolean;
var
selField : TField;
begin
Result := True;
try
selField := Fields.GetField(index);
FRecStream.Seek(selField.pos,soFromBeginning);
FRecStream.Write(buffer,SizeOf(selField.length));
except
Result := False;
end;
end;