Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


View SQL via ODBC? - Corrupt mdb

Posted on 2005-04-24
Medium Priority
Last Modified: 2008-03-10
Two days after I finished the development of my Access database (housed on a network drive), the file went corrupt, and I can no longer open it in Access ("AOIndex" error).  I've tried all the recovery tricks, and I've come to face the fact that it's nonrecoverable.  My backup copy was 4 days old, so I've got 2 days worth of work to recover.  (I know, I should have immediately saved a copy upon completion.  Lesson learned.)

Luckily, I can still communicate with the database via ODBC.  I've already recovered all the tables and data.  I guess I'm out of luck with the forms, but is there a way to somehow view the SQL code of the queries using ODBC?

Any ideas?

Question by:cotton9
  • 2
  • 2
LVL 27

Accepted Solution

jjafferr earned 270 total points
ID: 13854996
Hi cotton9,

if you can read from Access, then this means that not everything is corrupted,
It might be a Form that is Corrupted,
So make a new mdb and import the Tables first (since they are working), then the queries, then the modules and keep the Forms for the end,
Don't import all at the same time (the Forms for example), import one at a time.

I hope this helps,


Author Comment

ID: 13855064
I actually cannot read it from Access, only with ODBC.  When I try importing a table into a new mdb, after entering the password, I get : "'AOIndex' is not an index in this table" twice.

Anytime I attempt to open in Access I get the same error.  
LVL 27

Expert Comment

ID: 13855162
This page shows how to recover, try it


LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 255 total points
ID: 13855559
Just a note,

When you say "I've tried all the recovery tricks"

Make sure you tried them all!

Do a search in google of every error message and Error code. Search for "Database Recovery", Search for "Corrupt database".

There are even some "Database Recovery" shops that claim to recover eveything: Indexes, table data, Forms, Queries Modules....ect  

(When I thought I knew all the tricks, someone introduced me to "JetComp.exe"!!!)

Author Comment

ID: 13855830
So I'm guessing that there's not an easy way to view SQL w/ ODBC.  

Thanks for trying to help.  I'm already familiar with both the suggested website and JetComp, neither did the trick.  

I found a trial version of AccessRecovery ($399.99) that limits its functionality by recovering everything, but not showing the recovered forms & reports.  It recovered all the queries perfectly!  That's what I needed.  I've already got the data & tables from ODBC, so I'll just have to rebuild a few forms (unless I can find a trial that limits everything but forms).  

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question