Solved

Operation invalid without a current index?

Posted on 2002-03-18
10
2,472 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
ID: 6876543
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
ID: 6876564
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
ID: 6876580
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 300 total points
ID: 6876636
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
ID: 6876706
It seems as if JETCOMP.EXE did the job. Thanks a lot.
0
 
LVL 1

Expert Comment

by:SharonF
ID: 7704536
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
ID: 7704585
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
ID: 7707945
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
ID: 7708780
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
ID: 8513161
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

815 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

14 Experts available now in Live!

Get 1:1 Help Now