Ado访问数据库中的find方法使用问题

eaglezhao 2001-11-30 11:29:30
我使用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,请各位大虾指教,不胜感激。
...全文
69 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyaohua 2001-12-01
  • 打赏
  • 举报
回复
因为第一条taxver_id值就是"0501410001":)
81083 2001-12-01
  • 打赏
  • 举报
回复
关注
eaglezhao 2001-11-30
  • 打赏
  • 举报
回复
to xlcjxlp():能不能说明白一点?如何解决?
xlcjxlp 2001-11-30
  • 打赏
  • 举报
回复
系统问题

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧