Click here to Skip to main content
15,886,068 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi ,
Below query when i execute iam facing "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)." to Connect MS Access dataBase.When i excute same in SQL Server its working but its not working for MS Access DataBase.Can any one help on this.

SQL
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
Posted
Comments
Richard MacCutchan 28-Jan-15 7:05am    
Where does the failure occur; in the database or in your code?
ZurdoDev 28-Jan-15 7:47am    
I believe Access wants # around dates. Do you have a copy of access? You could test it and debug it directly in Access.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900