有哪位可以告诉我这个简单的问题(有100分)(100分)

  • 主题发起人 zzg0000000
  • 开始时间
Z

zzg0000000

Unregistered / Unconfirmed
GUEST, unregistred user!
我在练习一段程序代码时,有一段这样的代码:
procedure TForm1.ADODataSet1AfterOpen(DataSet: TDataSet);
begin
ShowAllRecNo;
//先在R a d i o G r o u p中加入一个所有城市的项目
rgCities.Items.Add('所有城市');
//把数据表的城市名称加入R a d i o G r o u p中
try
ADODataSet2.Active := true;
ADODataSet2.First;
while not ADODataSet2.Eof do
begin
rgCities.Items.Add(ADODataSet2.Fields[0].AsString);
ADODataSet2.Next;
end;
finally
ADODataSet2.Active := false;
end;
rgCities.ItemIndex := 0;
end;
但是在运行时会出现:
‘BOF或EOF中有一个为真,或者当前的记录已被删除,所需的操作要求一个当前的记录。’
请问这是一个什么样的错误,如何解决???
多谢。

 
MDAC v2.6 "Either EOF or BOF is true." error with ADOExpress
This update corrects a known issue which affects
certain ADOExpress applications when running against MDAC 2.6. Most commonly, the following error is generated when closing an empty dataset: "Either EOF or BOF is True, or the current record has been deleted. Requested operation requires a current record". The same error may also occur when canceling an edit operation. Affected applications should be recompiled after the update is installed
是ADO的BUG,升级吧,2。6就可以了。
 
你需要安装Delphi5的AdoPatch补丁包;你可以到www.Borland.com去下载:
ftp://ftpc.borland.com/pub/delphi/devsupport/updates/delphi5/D5EntUpdate.exe
ftp://ftpc.inprise.com/pub/delphi/devsupport/updates/adoexpress/d5adoupdate2.exe
序列号在以下找:
555-555-5555 9ex0-91x0
SKI-HD3-C139 92x0-92x1
111-111-1111 fex1-91x0
 
这是一个bug.你只需打补丁就可以了。
如果想懒些,用winxp+delphi 6也不会出现这问题。
 
装完delphi的ado的两个补丁就可以了
 
那请告诉我D5EntUpdate.exe的SN是什么???
 
Serial: SKI-HD3-C139

Autorzaion Key: 92x0-92x1
 
谢谢你们对我的帮助。[:)]
 
顶部