Tuesday, April 1, 2008

MS Access Error on running "join/select into" query

Was getting the following error when running a "join/select into" query in MS Access

"Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt."

I followed a bunch of suggestions I had found on the web ... especially this post which had suggested that I should reinstall Jet (which led me to this post which suggested I ultimately needed to reinstall Windows XP SP2 ... which in a slipstream install means that the entire OS needs to be reinstalled!)

Ultimately, I was able to solve this problem by simply saving the database in MS Access 2003 format (.mdb) from the 2007 format I had stored it in (.accdb). I was able to run the query from the mdb and then resaved back into Access 2007 format, where I am again able to re-rerun the query.


Unknown said...

just ran into this error with an append query. i did two things -- both fixed my problem, but if i had done the second before the first, that would probably have been better

1. exported out xls tables from db, created new db and imported these, then ran query again

2. using access query design view, only added one table after selecting an append type query (the table which is being added to another) -- query wasn't working because i was asking the db to add something like 25million new records. for some reason reimporting the tables from xls allowed me to do this. however, this wasn't what i wanted to do at all, and all i needed to do was to take out the 'to table' to be appended from the design view window.

Unknown said...

YES, you must never include the "TO" table in the design window ... for some reason this blows up your append query