By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

"IErrorInfo.GetDescription failed with E_FAIL(0x80004005)." ......

P: n/a
In my C# application all queries runs well both with MS Access and SQL Server
databses. But only the following query runs well on SLQ Server2000 but with
MS Access gives error
=> "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)."

QUERY:
" SELECT "+
" (select Quantity from Items_Detail idt "+
" where idt.Barcode = MB.Barcode "+
" AND MB.inv_date='Friday, September 16, 2005'" +
" ) AS \"Qty on: Friday, September 16, 2005\"" +

" ,(select Quantity from Items_Detail idt "+
" where idt.Barcode = MB.Barcode "+
" AND MB.inv_date='Tuesday, September 20, 2005'"+
" ) AS \"Qty on: Tuesday, September 20, 2005\""+

" , idt.Barcode, idt.Place, idt.Description, idt.[Purchase Date],
idt.[Years Used], idt.[Condition], idt.[Actual], idt.[Elevative],
idt.[Depreciation], idt.[Notebook Value], idt.Present, idt.Absent,
idt.[Absence Reason] " +

" FROM Items_Detail idt, "+
" ( /*The purpose of this query is to return the missing Barcodes in either
of two Dates*/ "+
" SELECT Inv_Date, Barcode FROM Inventory inv "+
" WHERE "+
" inv.Barcode IN (select inventory.Barcode from inventory where
inv_date='Friday, September 16, 2005')"+
" AND inv.Barcode NOT IN (select inventory.Barcode from inventory where
inv_date='Tuesday, September 20, 2005')"+
" OR "+
" inv.Barcode IN (select inventory.Barcode from inventory where
inv_date='Tuesday, September 20, 2005')"+
" AND inv.Barcode NOT IN (select inventory.Barcode from inventory where
inv_date='Friday, September 16, 2005')"+
" ) MB /*Missed Barcodes*/ "+
" WHERE idt.Barcode = MB.Barcode "+
" AND (MB.Inv_Date = 'Friday, September 16, 2005' OR MB.Inv_Date = 'Tuesday,
September 20, 2005') ";

The connection strings I am using are as follows:

Connection Srting for SLQ Server:
cn_str = "Provider=SQLOLEDB.1;Server=arif_nb\\cArabic; Database=BassamDb;
User ID=sa; Pwd=; Integrated Security=false;";

Connection Srting for MS Access:
cn_str = @"Provider=Microsoft.Jet.OleDb.4.0;Data Source=" +
Settings.database + ";jet oledb:Database Password=" + Settings.pwd;
This is somehow a complex query and I don't know that MS Access supports
this type of queries. In SQL Server it is working well.

Please help in identiying that why this quey gives Error =>
"IErrorInfo.GetDescription failed with E_FAIL(0x80004005)." with MS Access
database, while works well with SQL Server.

Arif.
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.