请教delphi中如何查询某个范围内的数据

dongmei757 2013-02-11 03:41:38
access数据库中保存有图片,
另外还有两个字段分别保存了图片的宽和高(文本类型PIC_W,PIC_H),表名师PIC,
请教如何能查询到宽度是 strtoint(edit1.text) -5 <= 宽度 <= strtoint(edit1.text) +5,并且高度是 strtoint(edit2.text) - 5 <= 高度 <= strtoint(edit2.text) +5的图片?
...全文
113 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
WWWWA 2013-02-17
  • 打赏
  • 举报
回复
select * from tt where val(PIC_W) between strtoint(edit1.text) -5 and strtoint(edit1.text) +5 and val(PIC_H) between strtoint(edit2.text) - 5 and strtoint(edit2.text) +5
ACMAIN_CHM 2013-02-12
  • 打赏
  • 举报
回复
select * from access数据库 where PIC_W+0 between strtoint(edit1.text) -5 and strtoint(edit1.text) +5 and PIC_H+0 between strtoint(edit2.text) - 5 and strtoint(edit2.text) +5

7,714

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
社区管理员
  • Access
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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