我在用ADO来访问SQLServer时,下面是我的代码qryTemp:=TADOQuery.Create(Nil);
strSQL:='select * from Operator where HotKey='+''''+strPas(pcValue)+'''';
OpenADOQuery(qryTemp,DBMS,strSQL);
strDocter:=qryTemp.FieldByName('Code').Asstring;
qryTemp.Close;
qryTemp.Destroy;重复到第二次qryTemp.CLose时报下面的错:
Either BOF or EOF is True,or the current record has been deleted.
Requested operation requires a current record.如何解决????
strSQL:='select * from Operator where HotKey='+''''+strPas(pcValue)+'''';
OpenADOQuery(qryTemp,DBMS,strSQL);
strDocter:=qryTemp.FieldByName('Code').Asstring;
qryTemp.Close;
qryTemp.Destroy;重复到第二次qryTemp.CLose时报下面的错:
Either BOF or EOF is True,or the current record has been deleted.
Requested operation requires a current record.如何解决????
去网上找个来升级吧
不知道D7有没有、、、
Either BOF or EOF is True,or the current record has been deleted.
Requested operation requires a current record.
大体意思是:已经到了记录的最前或最后,或者操作的当前记录被删除了,我怀疑你在其它什么地方操作了数据库,而这里没更新造成的。
至于bug的传说,我见识浅,没听说过。
http://info.borland.com/devsupport/delphi/mdac26.html
这的的确是delphi5的一个“BUG”, 不然发布补丁干什么?!
常见delphi5 的ADO补丁有三个,下载网址:
http://mydelphi.8u8.com/update.htm
同时有D6,D7的升级包,全免费!
strSQL:='select * from Operator where HotKey='+''''+strPas(pcValue)+'''';
OpenADOQuery(qryTemp,DBMS,strSQL);
strDocter:=qryTemp.FieldByName('Code').Asstring;
qryTemp.Close;去掉qryTemp.Destroy;试一下.或该为qryTemp.free;
2 http://expert.csdn.net/expert/FAQ/FAQ_Manage.asp?id=0&Topicid=1874617
strSQL:='select * from Operator where HotKey='+''''+strPas(pcValue)+'''';
OpenADOQuery(qryTemp,DBMS,strSQL);
strDocter:=qryTemp.FieldByName('Code').Asstring;
qryTemp.Close;去掉qryTemp.Destroy;试一下.或该为qryTemp.free;