将反向数据中的错误导入访问数据库 [英] getting error in retrive data into access database

查看:79
本文介绍了将反向数据中的错误导入访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我的这个代码是在sql数据库上工作但是当我在访问数据库中使用这个查询然后我得到错误.....

错误是.....IErrorInfo。 GetDescription因E_FAIL(0x80004005)而失败。



Hello every one my this code is work on sql database but when i use this query in access database then i m getting error.....
error is....."IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."

cmdselect.CommandText = "select PD.Prod_ID,PD.Prod_BrandName, PD.Prod_ModelNo,sum(case when PM.prod_Qty is not null then PM.prod_Qty else 0 end ) as Purchase_Item,sum(case when SM.prod_Qty is not null then SM.prod_Qty else 0 end) as Sale_Item,sum(case when PM.prod_Qty is not null then PM.prod_Qty else 0 end )-  sum(case when SM.prod_Qty is not null then SM.prod_Qty else 0 end) as Balance_Item from tbl_ProductDetails PD left join tbl_PurchaseMaster PM on PD.Prod_ID=PM.Prod_ID left join tbl_SaleMaster SM on PD.Prod_ID=SM.Prod_ID group by PD.Prod_ID,PD.Prod_ModelNo,PD.Prod_BrandName";





请帮助我。



plz help me.

推荐答案

Access不支持CASE WHEN构造。



Access支持TSQL的子集,而不是整个语言规范。
Access doesn''t support the CASE WHEN construct.

Access supports a subset of TSQL, not the entire language specification.


这篇关于将反向数据中的错误导入访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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