Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Dbase is broken!!!! HELP!!!!! QUICKLY!!!!!

Status
Not open for further replies.

kjenkinz

Technical User
Jan 24, 2003
16
US
My data base won't open. I keep getting an error message. I have tried to import the objects into a new dbase and all, nothing works. The error message is "THE DATABASE IS IN AN UNEXPECTED DTATE, MS ACCES CAN'T OPEN IT" Then goes on about this whole conversion spill but this dbase has never been converted. Help!!!!!

Also, There is no .ldb file out there and I use MS Access 2000.
 
have you tries holding down the [shift] key while opening. this stops code and macros from executing and might give you enough of a window to get in if your problem lies in the corruption of either of these.
 
Tried holding shift, that did not work. Thanks spiralmind, any other ideas?
 
Don't know if this will help but I run this every night after everyone is gone. Make a new DB and put this in a module:

Public Function CompactDB()
Dim dataDB As String

'Assign backend database including its path as dataDB
dataDB = <Path including DB Name here>
'Compacts backend into a temp database
DBEngine.CompactDatabase dataDB, <Path including file name of temp DB>

'Check to see if new databse exists before deleting
'original
If Len(Dir(<Path including file name of temp DB above)) > 0 Then
'Deletes orginal
Kill dataDB
'Rename temp.mdb to original name
Name <Path and Name of new DB> As dataDB
End If
End Function

All it does is compact and repair to a temp DB then deletes original, then renames temp to original. The nice thing is you can execute this from a different database on the database you are having trouble with. Hope it helps...
 
Hey Cruford, Didn't work! That was a neat trick though. I will be using it from now on. It did compact the db and make a new one, but I still can't open then new one that it made.
 
get the Jetcomp.EXE from microsoft. this is much better then the Repair and compact within access.

 
Thanks dvannoy, but the dbase is compactable externally, it just will not open. Access can not open the dbase. I can't even access to import files to or from it. I just can't figure this out.
 
did you use the Jetcomp.exe?? if not use it. 9 times out of 10 it fixes problems like this..otherwise i hope you have a good backup?

 
Yes dvannoy, I used the Jetcomp.exe and it actually was able to go in and compact the db externally. However, I still couldn't open it and I have no back up. :-(
 
well, I hate to say it but your screwed... rule number one - ALWAYS BACKUP YOUR DATA!!!.. you can contact microsoft for about $200 per hour but even they might not be able to fix it. I had this problem once before worked with microsoft and did everything they told me to do, spent about $600 and still could not open the DB. Microsoft said &quot;Were sorry but your Database is corrupt beyond repair, Thank you for calling Microsoft&quot;

Dude, start backing up your Data!

 
if this means anything, i've written this code that will backup an entire database whenever you call it (actually, at a maximum of once a day - unless you modify it). you just fill in a directory of your choice and call it from your db's open or close event.

this way you will never loose more than one day's work or data from you db.
 
of course, it helps when i remember the code:

Option Compare Database
Option Explicit

'//////////////////////////////////////////////////////////////////////////////////////

Sub subBackupDB()

' Declare win32 file system:

Dim fs
Set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)

' Assign backup folder:

Dim i As Integer
Dim bolFind As Boolean

Do Until bolFind = True

If Left(Right(CurrentDb.Name, i), 1) = &quot;\&quot; Then bolFind = True

i = i + 1

Loop

Dim strFile As String
strFile = Right(CurrentDb.Name, i - 2)

Dim strDest As String
strDest = &quot;C:\Documents and Settings\n0111546\DBBackup\&quot;

Dim strInto As String
strInto = strDest & &quot;(Backup &quot; & Format(Date, &quot;mm-dd-yyyy&quot;) & &quot;) &quot; & strFile

' If the filename is unique in the destination folder:

If fs.FileExists(strInto) = False Then

' Move the file:

fs.CopyFile CurrentDb.Name, strInto

End If

End Sub

'//////////////////////////////////////////////////////////////////////////////////////

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top