Ado访问数据库中的find方法使用问题
我使用ADO2.5访问FOXPRO的DBF表,在访问时候出现记录集不能定位查找到的记录,代码是这样的:
dim conndata as new adodb.connection
dim rstaxreg as new adodb.recordset
const str1="0501410001"
with conndata
.cursorlocation=aduserclient
.connectstring="Driver={Microsoft Visual Foxpro Driver};SourceDB=c:\data;SourceType=DBF;"
.open
end with
with rstaxreg
.open "select * from taxreg",conndata,adopenkeyset,adlockoptimistic
.find "taxver_id='" &str1 &"'"
if not .eof then
msgbox .fields("taxver_id")
end if
end with
结果系统显示的始终是第一条记录的taxver_id字段值,将代码在另外一台机器上使用没有问题,出现正确结果的机器使用的是Windows2000 server,不正确的结果的机器上的系统是Windows2000 professional,请各位大虾指教,不胜感激。