TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nel
NA
716
1.1m
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
Nov 16 2011 7:40 AM
Hi could anybody help me please what is the problem with my code?
I get this error IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
on this row
oleDBDataAdapter1.SelectCommand=command;
I suppose that the error is in select statement. Here is the code
SELECT NOVI.GBR as gbrnov, NOVI.AB as abnov, NALOG1.DATA as datanov,Min(NALOG1.POCKM) AS MinOfPOCKM, Max(NALOG1.KRAJKM) AS MaxOfKRAJKM,(Max(NALOG1.KRAJKM)-Min(NALOG1.POCKM)) AS RAZLIKA, (MAGACIN.KOL)/100 AS Potr100km, MAGACIN.SIFRA, (case when [MAGACIN.SIFRA]='0991000' then [MAGACIN.KOL] else null end as 'Gorivo', case when [MAGACIN.SIFRA]='0993050' then [MAGACIN.KOL] else null end as 'Maslo'), NOVI.DATAP AS poslprov, NOVI.DATAS AS poslservis FROM (NALOG1 INNER JOIN MAGACIN ON NALOG1.GBRV=MAGACIN.GBR) INNER JOIN NOVI ON NALOG1.GBRV=NOVI.GBR where ( ( ( (NOVI.GBR)>=? And (NOVI.GBR)<=? ) ) AND ( (NOVI.AB)=? or (NOVI.AB)=?) AND ( ( (NALOG1.DATA)>=?) and ((NALOG1.DATA)<=?) ) ) GROUP BY NOVI.GBR, NOVI.AB, NALOG1.DATA, NOVI.DATAP, NOVI.DATAS
Before I insert the code for MAGACIN.SIFRA and MAGACIN.KOL everything worked fine.
Thanks
Reply
Answers (
3
)
Select statement with field from used under different names depening on the values of other field in the same table
Ref & Out keywords