D
DT
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么,我引用Query的内容时提示该内存不能为"written"?不知如何解决!求救。在win2000下。不会吧,难道没一个会?我已经提前了这么多次了 ? (80分)<br />pbmain为在其他单元定义的一个对象。allbody为一Tquery对象。
在本单元内对其值进行赋值时会出现提示:
Project pb.exe raised exception class EAccessViolation with
message 'Access violation at address 004A8826 in module 'pb.exe'.
Write of address 00000008'. Process stopped Use Step or Run to continue.
(Delphi提示)
程序如下:
procedure TFrmMain.allbodyAfterOpen(DataSet: TDataSet);
var
vi:integer;
begin
//出错处,但若用showmessage(inttostr(allbody.RecordCount));则不会提示出错。
//这是什么原因呀。我试了许多种方法了,这是最后一种了,把所有代码都放到
//allbody的Afteropen里都不行了。怎么办呀,所有的东西都停在这里了。
pbmain.pbcnt:=allbody.RecordCount ;
....
end;
所用的平台为windows2000专业版。是否与这有关系?求救.
在本单元内对其值进行赋值时会出现提示:
Project pb.exe raised exception class EAccessViolation with
message 'Access violation at address 004A8826 in module 'pb.exe'.
Write of address 00000008'. Process stopped Use Step or Run to continue.
(Delphi提示)
程序如下:
procedure TFrmMain.allbodyAfterOpen(DataSet: TDataSet);
var
vi:integer;
begin
//出错处,但若用showmessage(inttostr(allbody.RecordCount));则不会提示出错。
//这是什么原因呀。我试了许多种方法了,这是最后一种了,把所有代码都放到
//allbody的Afteropen里都不行了。怎么办呀,所有的东西都停在这里了。
pbmain.pbcnt:=allbody.RecordCount ;
....
end;
所用的平台为windows2000专业版。是否与这有关系?求救.