Forum guidelines
  • Home
  • »
  • ADO.NET & Database
  • »
  • System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
AuthorQuestion
System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Posted By kawaljit singh on 09 Aug 2009

hi every body
here's my problem, m gettin this error(System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005)) while using this query

SELECT sc.schoolname, t.itemname, i.itemsize as Size, Count(*) as iTemCount FROM schoolitemmap s, iTemTypes t, iTemTable i, School sc WHERE s.SchoolId = 1 and s.schoolid=sc.schoolid and s.itemid=i.itemid and t.itemtypeid=i.itemtypeid and s.g_or_b = 0 group by sc.schoolname, t.itemname, i.itemsize


statement may be a reserved word by using [] these somewhere (:-P) . So someone please help me. Someone pls edit this query for me.

Thanks

AuthorReply
Kirtan Patel
  • 0
  • 0
accepted
Re: System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Posted By Kirtan Patel on 09 Aug 2009   Accepted Answer
Hi , Friend


SELECT sc.schoolname, t.itemname, i.itemsize as Size, Count(*) as iTemCount FROM schoolitemmap s, iTemTypes t, iTemTable i, School sc WHERE s.SchoolId = 1 and s.schoolid=sc.schoolid and s.itemid=i.itemid and t.itemtypeid=i.itemtypeid and s.g_or_b = 0 group by sc.schoolname, t.itemname, i.itemsize

dont use Size its Reserved keyword use anything else :)


or Rewrite the Query Like Below (Elcolse Size in Single Quote 'Size' )


SELECT sc.schoolname, t.itemname, i.itemsize as 'Size', Count(*) as iTemCount FROM schoolitemmap s, iTemTypes t, iTemTable i, School sc WHERE s.SchoolId = 1 and s.schoolid=sc.schoolid and s.itemid=i.itemid and t.itemtypeid=i.itemtypeid and s.g_or_b = 0 group by sc.schoolname, t.itemname, i.itemsize


Happy Coding :)




MY BLOG ( www.codestructs.com ) | MY SITE

Kirtan
 Patel   BCA   MCA (SEMESTER-IV)  MINDCRACKER MVP WEB HACKER



Re: System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Posted By kawaljit singh on 09 Aug 2009  
hey kirtan,
Thanks a lot, it worked for me.........thnks friend.... :-)

Re: System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Posted By thong chu ba on 29 Mar 2010  
My problem is the same this guy. Please help me!

My query string :

strSQL="Select [s].[StudentID], [s].[StudentName], [r].[MaAvg], (Case When [r].[MaAvg]>=5 then 'pass' else 'fail' end) as 'ResultCol' From Student s, Result r where s.StudentID=r.StudentID";

So someone please help me. Someone pls edit this query for me.

Training for .Net Developers

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.