---------------------------
Debugger Exception Notification
---------------------------
Project LF961.exe raised exception class EPrivilege with message 'Privileged instruction'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
function TRecordStream.AppendRec(Const Rec): Longint;
begin
// This function writes the record Rec to the stream
Seek(0, 2);//这里错误,错误如上面
Result := Write(Rec, GetRecSize);
end;我在把数据读入到流文件时,发生的,为什么呢,我的流文件如下
TPersonRec = packed record
id:integer;
Gps:string[23];
multi:array[0..1008] of char;
Debugger Exception Notification
---------------------------
Project LF961.exe raised exception class EPrivilege with message 'Privileged instruction'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
function TRecordStream.AppendRec(Const Rec): Longint;
begin
// This function writes the record Rec to the stream
Seek(0, 2);//这里错误,错误如上面
Result := Write(Rec, GetRecSize);
end;我在把数据读入到流文件时,发生的,为什么呢,我的流文件如下
TPersonRec = packed record
id:integer;
Gps:string[23];
multi:array[0..1008] of char;
解决方案 »
- 急....ADO从MSSQL中读取二进制流到TADODataSet,如果将其中的二进制内容写入到文件中?
- 一个三层结构的中间层函数,但是却有点问题,请教各位
- 如果检查adotable中是否有需要保存的数据?即adotable中是否添加或者修改了数据并且尚未保存?
- 大家打包用什么工具??给推荐个
- 如何在报表中只显示日期型字段的日如2003-3-12 我只想显示12
- 求救!这段query的SQL错在那里了?
- 关于拦截功能键
- 这条模糊查询语句哪里有问题啊。郁闷!
- 使用Tidtcpclient发送的问题
- 提问:到底是DELPHI5还是6版本稳定啊?
- 在线等待帮助!!
- 大虾们向小弟推荐一本用delphi开发corba的书吧
procedure tmain_form.put_lf961(id:integer;gp_str:string;lf_str:string;lf_bz:integer;gps_bol:boolean);
var
str:string;
i,j,k:integer;
begin
try
if length(lf_str)>17 then
begin
str:='';
lf_record.id:=id; if gps_bol=true then lf_record.Gps:=gp_str;
if length(lf_str)<1009 then strcopy(lf_record.Multi, PChar(lf_str))
else
strcopy(lf_record.Multi, PChar(copy(lf_str,1,1008))); lf_stream.AppendRec(lf_record);
lf_stream.NextRec;
end;
except on e:exception do
begin
showmessage(e.message);
exit;
end;
end;
end;
所以出错,还有个问题请教,简单,我马上给分,如何判断一个文件流是否存在,
我关闭窗口时需要用到
if lf_stream<>nil then lf_stream.Free; 好象不对,请指点除了NIL还有什么办法,谢谢
lf_stream :=nil
if lf_stream<>nil then
begin
lf_stream.Free
lf_stream :=nil
end;
lf_stream :=nil
会报错,谢谢,