Forum guidelines
  • Home
  • »
  • C# Language
  • »
  • IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
AuthorQuestion
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
Posted By Nel on 16 Nov 2011
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

AuthorReply
Re: IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
Posted By Javeed M Shaikh on 16 Nov 2011  
Hi Nel,

try this..

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

Nel
  • 0
  • 0
Re: IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
Posted By Nel on 16 Nov 2011  
Hi Javeed,

 I tried this code but I get the same error again IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Nel
  • 0
  • 0
Re: IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
Posted By Nel on 16 Nov 2011  
Would it help you if I send you the dataset, crystalreport and the code for the whole report form which contains the above code (select statement)?
C# Corner Annual Conference 2015

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.