Solved

Operation invalid without a current index?

Posted on 2002-03-18
10
2,402 Views
Last Modified: 2010-05-18
During normal operation one of databases in my project chrashed. It's a JET 3.0 database. No repair functions are working on that base and every time I try to open it I get "Operation invalid without a current index" messsage box.

If I try to run repair procedure msg box with "(path and base name) isn't an index in this table. Look at the Indexes collection of the TableDef object to determine the valid index names."

If I open the database in debug mode with VB and compare its structure with a few months old base, I can see that after collapse TableDefs and Containers objects of failed base have changed.
In debug window it looks like this:

Failed database
|-
|
|- TableDefs
|  |
|  |- Count <Operation invalid without a current index.>
|
|-
..

Old database
|-
|
|- TableDefs
|  |
|  |- Count 10
|  |
|  |- + item 1
|  |
|  |- + item 2
...

Does anybody have any idea how to repair this base?
0
Comment
Question by:HDE226868
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 8

Expert Comment

by:dovholuk
Comment Utility
the standard method is to try to import the table into another database then rebuild any indexes that were on the table. i suggest you open a new db and then choose file->get external data->import... and try that.

if that doesn't work, and you've used all the "standard" repair tools access comes with, there used to be a /decompile option in access97.  i don't know if it still exists in a2k or axp, but you could give that a go.

just some info that may (or may not) help. ;)

dovholuk
0
 
LVL 3

Author Comment

by:HDE226868
Comment Utility
Get external data didn't work. I have access 97, so do You know where could I find this /decompile?
0
 
LVL 3

Author Comment

by:HDE226868
Comment Utility
Checking this base again and agin, it seems like if only TableDefs Index property is corrupt. If I could only set the number of tables to 10 ..., but TableDefs->Count is a read-only property.
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 300 total points
Comment Utility
That error message means the database is corrupt.  Download JETCOMP.EXE from Microsofts web site and see if that will repair it.  If not, go to a backup.

Also, as already mentioned, trying to import everything into a fresh MDB is another remedy.

Jim.
0
 
LVL 3

Author Comment

by:HDE226868
Comment Utility
It seems as if JETCOMP.EXE did the job. Thanks a lot.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Expert Comment

by:SharonF
Comment Utility
Wow, thank you so much!!!

This issue has aggravated me countless times, not to mention the loss of time and data involved each time it happens.  Most recently, this morning, I "lost" a good two or three hours of critical work with this problem.  I know I have searched the MS KB in vain for the exact error text, but out of desperation, today I ran a Google: "access 97" "Operation invalid without a current index."

Voila!  Up pops my exact question (although I didn't know how to dig as far into it as HDE226868).  And the miraculous answer from Jim Dettman!  JETCOMP.EXE did the trick on today's lost mdb, and I can't wait to try it on others I had given up for dead.

Thanks again!
-Sharon
0
 
LVL 1

Expert Comment

by:SharonF
Comment Utility
BTW...

I found the download Jet35sp3.exe from the MSKB Article 172733 - ACC97: Updated Version of Microsoft Jet 3.5 Available for Download.  JETCOMP.EXE is included in this download.

Be sure to read the warning about having O97 SR-2 installed before using Jet35sp3.exe on your system.

-SF
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
Glad you found the information usefull. A few more MSKB articles that may be of help:

HOW TO: Keep a Jet 3.x Database in Top Working Condition
http://support.microsoft.com/default.aspx?scid=kb;en-us;303519


ACC: Jet Database Engine 3.x Error Messages Due to Corruption
http://support.microsoft.com/default.aspx?scid=kb;en-us;182867

Jim.
0
 
LVL 1

Expert Comment

by:SharonF
Comment Utility
Excellent links, Jim, thank you!  They're now in my Favorites.

I finally see the answer to the question of what causes this corruption - when the Repair process is aborted - or probably in my case, interrupted by a crash most likely.

Have a great weekend!
-Sharon
0
 

Expert Comment

by:Nambsul
Comment Utility
If Jetcomp does not work for you (as in my case) then try the following using Microsoft Excel (I had MS Excel 97)

Carry on like you are about to make a new Query in Excel(Data->Get External Data->Create New Query). This will bring up the "Choose Data Source" option box, just click on "OK" to bring up the "Create New Data Source" box. In 1. enter any name, select "Microsoft Access Driver" in 2. and click on 3. connect.

You should now see the "ODBC MS Access Setup" box. Click the select button and select your corrupt DB, then click the repair button. Worked like a charm for me.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now