Re: Error when calling the OleDbDataAdapter.Fill() method



Have you tried copying and pasting the query into an Access query
window (the SQL pane)? That will tell you whether there's a keyword
violation or not.

-mary

On Mon, 4 Jun 2007 12:46:19 -0400, "Nathan Sokalski"
<njsokalski@xxxxxxxxxxx> wrote:

I am recieving the following error message when I call the
System.Data.OleDb.OleDbDataAdapter.Fill() method in ASP.NET/VB.NET:


IErrorInfo.GetDescription failed with E_FAIL(0x80004005).


I have looked for help on this error on the web, and every site I found said
it is caused by using a keyword as a fieldname in my database. However, I
have checked and am pretty sure that none of my fieldnames are keywords.
Here is the SQL statement I am executing (I am using Microsoft Access as my
database):


SELECT headline,url,summary,updated FROM worldnews EXCEPT (SELECT
headline,url,summary,updated FROM worldnews WHERE newssection='Archives'
UNION SELECT TOP 5 headline,url,summary,updated FROM worldnews WHERE
newssection='Archives' UNION SELECT TOP 5 headline,url,summary,updated FROM
worldnews WHERE newssection='Main') ORDER BY displayorder DESC


Also, if I execute the following statement, which you will notice involves
the same table and fields, on the same database:


SELECT TOP 5 headline,url,summary,updated FROM worldnews WHERE
newssection='Main' ORDER BY displayorder DESC


It executes as expected with no problem. What is the problem here? Did I
make a syntax error in the SQL statement that is giving me a problem? Is the
error because the query will return 0 records (The database does not have
many records yet since the site is not yet live)? Thanks.
.



Relevant Pages

  • Re: League
    ... I'd be surprised if "Data" isn't a reserved keyword. ... the SQL View of the Query Builder, now is the time to start. ... it's simple to determine which Home teams the referee has not refereed. ...
    (microsoft.public.access.queries)
  • Re: League
    ... In data are the matches a referee has had, ... I'd be surprised if "Data" isn't a reserved keyword. ... using the SQL View of the Query Builder, now is the time to start. ...
    (microsoft.public.access.queries)
  • Re: Sum with Parameters in a Subquery
    ... criteria and look at the SQL, ... look at the SQL, the keyword is HAVING instead of WHERE. ... It might be easier to do the query in the db app, ...
    (microsoft.public.excel.programming)
  • Re: 10Lb query chanllange
    ... As Klatuu requested, example records from your Table, the SQL from your Query, and a more detailed example of the output you'd like from the Query would be helpful. ... I added numbers in front of the animals' names, as otherwise I could not see an easy way to sort them into an order where "Dog" is between "Cat" and "Animals". ... To combine those similar "Keyword" fields into one, you might use a Query similar to this one. ...
    (microsoft.public.access.gettingstarted)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)

Loading