“这种类型的对象不支持操作".通过运行查询传递的SQL中的ODBC错误 [英] "operation is not supported for this type of object" ODBC error from running SQL pass through query

查看:170
本文介绍了“这种类型的对象不支持操作".通过运行查询传递的SQL中的ODBC错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将这个特定的项目放在这里是因为我在StackOverflow上遇到了完全不同的地方,并且在任何地方都看不到这个特定的答案.

使用SQL直通查询运行MS Access报告时,我又遇到了"ODBC错误".dao.Errors包含此类型的对象不支持该操作"

解决方案

当查询由于子查询返回多个值而引发错误时,SQL直通查询也会返回此错误

在我的情况下,存储过程正在对表变量进行一些更新,并使用子查询进行求和

例如更新T SET X =(从Z处的Y中选择Z.A = T.A),并且A在Z中碰巧出现了两次

I'm putting this specific item in here because I ended up somewhere completely different on StackOverflow, and don't see this specific answer anywhere.

I was getting an "ODBC error" back from running an MS Access report using an SQL passthrough query, and dao.Errors contained "Operation is not supported for this type of object"

解决方案

This error is also returned from an SQL pass through query when the query throws an error because a sub query return multiple values

In my case, the stored procedure was performing some updates on the table variable and using a subquery for totalling

e.g. UPDATE T SET X = (SELECT Y FROM Z WHERE Z.A = T.A) and A happens to appear twice in Z

这篇关于“这种类型的对象不支持操作".通过运行查询传递的SQL中的ODBC错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆