为什么会抱错:capability not supported

sulemon 2002-09-16 08:12:37
写了如下的一段程序:

with datamodule1.qry_rstemp do
begin
close;
sql.clear;
sql.add('select * from xsmc where xsxh_id not in (select xsxh_id from byqk) and zyh0=:id');
parambyname('id').asstring:=dbgrid1.Fields[0].asstring;
open; //运行到这里 报错
end;
错误提示为:EDBEngineError with message:capability not supported
什么意思啊??? 什么能力不支持

请高手们指导
...全文
206 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dingobin 2002-09-16
  • 打赏
  • 举报
回复
方案一:
将 sql.add('select * from xsmc where xsxh_id not in (select xsxh_id from byqk) and zyh0=:id');
写在
parambyname('id').asstring:=dbgrid1.Fields[0].asstring;
后边即
parambyname('id').asstring:=dbgrid1.Fields[0].asstring;
sql.add('select * from xsmc where xsxh_id not in (select xsxh_id from byqk) and zyh0=:id');

方案二:将id申明成一个变量,
sql.add('select * from xsmc where xsxh_id not in (select xsxh_id from byqk) and zyh0=:id');
改为
id:=dbgrid1.Fields[0].asstring;
sql.add('select * from xsmc where (xsxh_id not in (select xsxh_id from byqk)) and zyh0='''+id+'''');
Dingobin 2002-09-16
  • 打赏
  • 举报
回复
你先别急,Let me look look!
blazingfire 2002-09-16
  • 打赏
  • 举报
回复
提示不是说你的BDE不支持这种嵌套查询操作吗?
我想大概是你用的数据库不支持这种嵌套查询操作.
sulemon 2002-09-16
  • 打赏
  • 举报
回复
为什么 为什么 有没有高手啊!!!!!
sulemon 2002-09-16
  • 打赏
  • 举报
回复
anyboby know????

5,402

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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