set talk off
clear
use 1.dbf
accept "请输入: " to cname
locate for 姓名=cname
if find()
? “姓名: "+姓名
else
?“没有”+alltrim(cname)+ "此人 "
endif
use
set talk on
------解决方案--------------------------------------------------------
if find()改为if found()
------解决方案--------------------------------------------------------
if find()-> if found()
------解决方案--------------------------------------------------------
楼上说得对