IErrorInfo.GetDescription因E_FAIL(0x80004005)而失败.Surendra Marri

时间:2015-01-28 11:29:23

标签: c# asp.net ms-access

执行下面的查询我正面临:

  

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

连接MS Access数据库。当我在SQL Server中执行它同样工作但它不适用于MS Access DataBase。任何人都可以帮忙解决这个问题。

select [EmpName],EmpMaster.EmpCodeDisplay,Transactions.CardNo,
case when CONTROLLERS.ControllerName = 'Level0Entry' then 'Reception' when CONTROLLERS.ControllerName = 'LevelBCiscoNSNRx' then 'Basement' 
else CONTROLLERS.ControllerName end as ControllerName,aDateTime from Transactions 
inner join CONTROLLERS on Transactions.ControllerNo = CONTROLLERS.ControllerNo  
inner join EmpMaster on Transactions.EmpCode = EmpMaster.EmpCode 
where transactions.ControllerNo in ('7','9') and aDateTime between '1/28/2015 05:45:00.000' and '1/28/2015 23:59:00.000' 
and transactions.EmpCode <> '0'   and Transactions.CardNo in (select CardNo from Transactions 
where transactions.ControllerNo in ('7','9') and transactions.EmpCode <> '0' and aDateTime between '1/28/2015 05:45:00.000' and '1/28/2015 23:59:00.000' 
 group by Transactions.CardNo having COUNT(Transactions.CardNo) < 2 )  order by aDateTime asc

1 个答案:

答案 0 :(得分:1)

您可以尝试使用SWITCH语句进行MS Access

OR

IIF