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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message Database in an unexpected state. help!

Status
Not open for further replies.

TCerven

Technical User
Feb 24, 2000
17
US
My database is on a network with several users. All of a sudden this message appeared. Unfortunately, I lost all the data for today and had to restore from Friday's backup. How could this happen and what can I do to prevent it from happening again? Also, no one that I know of knows how to or would try to convert this database. I have now put a password on it to protect it. Please advise.

This database has been converted from a prior version of Microsoft Access by using the DAO CompactDatabase method instead of the Convert Database command on the Tools menu (Database Utilities submenu). This has left the database in a partially converted state. If you have a copy of the database in its original format, use the Convert Database command on the Tools menu (Database Utilities submenu) to convert it. If the original database is no longer available, create a new database and import your tables and queries to preserv your data. Your other database objects can't be recovered.
 
I think that this might help you.

Create a new database container (an mdb file) and import all the tables and relations from this unsafe mdb, that should do the trick.

If there is any errors in the converted base you will get an err msg during the import.
Let me know how it turnes out.

Herman
 
Thank Herman,

I tried to do that but the error message pops up and freezes the screen. Any idea how the database could be put into a converting mode without having someone do that process? I am worried that someone is trying to hack my data.
 
Once the back-end is converted there should be no reason to convert this ever again, except to upgrade to the next access from m$ ofcourse.

I am still not clear on the following:
1. Did you do a correct convertion via tools/etc.
2. Did you note any errors when importing this converted base into a new contaner.

Herman
 
Herman,

That's what I thought. I didn't convert the database. I just got the message that the database was stuck in the convertion mode. I just don't understand why I got this message.
 
Try:
Start-Run
msaccess.exe /decompile K:\Path\Filename.mdb

It solved this problem for me...
If it doesn't, you should think of backing up files more often.

Good luck
[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
1. Daniel is right decompile.
2. If your base is not in a front/back-end do this.
3. Now convert backend if everything ok goto convertion of frontend if not, you have a crached base if this is the case look thru all tables/records delete any foulty records.
4. You should now have a error free backend convert this via tools/etc. of via import to empty container.
5. Convert frontend, if no problems Jubii, you are home free, if you have problems here make a note of where the convertion halts and work from here. The import to empty container could also help you here.
6. Error check frontend, check poss lost refrences via tools in vba, your problem could be here, but I doubt it.
7. Let us know what happens.

Herman
 
Ok - now I am really in trouble. I put a password on this database called casper. The database worked fine yesterday and now it does not recognize the password. Help!!!!! I tried your suggestion to decompile and the stupid thing prompts for the damn password. I ad IT restore the database that didn't have a password and that one is prompting for a password. No good! Now what do I do???
 
U R in deep trouble, somehow you seem to get deeper and deeper, lets see if we cant get you back on dry land.
Zip your database and mail it to me at: herman@wfbutik.dk and shall untangle it for U.
Herman
 
Did anyone find the permanent fix for this problem. We recently upgrade from office97 to office2000. We have couple databases in access2000 and they worked fine for about a two months and now we are facing these problems.

1) Two databases, it's coming up with "This Database is in unexpected state; Microsoft can't open it...." error. We have front end and back end database and the both resides on sever. I was reading the treads and it mention that front end should be on client. In our situation database front end changes more often sometime couple times a day and we have multiple users uses this database(fe). It's very hard to updata everybody's fe database on their machine.

2) One database, it open up the database window instead of opening swithboard form which I have setup in startup window. In this case I have to logoff every user connected to the database and do compact & repair database and then specify the switchboard form in startup window again and disable other options in startup window again. Then works fine for sometimes couple days and sometime only couple hours. Again this database has front end and back end and they both resides on the server.

In all databases front end database has link table from backend database and also link tables from Centura SQLBase database. Some other databases works fine for now.(thank God)

Any help will be appreciated.
 
1) The front-end does not have to be located on a user PC it can very well be located on a server as in your case. I was only refering to "the usual way" not a "has 2 be" ;-)

2) Perhaps this code can help you to take control af your startup - place it in any module and call it via your autoexec before calling anything else.

Function SetDatabaseOptions()
On Error GoTo ErrorHandler

'DoCmd.OpenForm Process_Message_Form_Name
'Forms(Process_Message_Form_Name)![Description] = "Setting Database Options..."
'Forms(Process_Message_Form_Name).Repaint
'View
SetOption "Show Status Bar", True
SetOption "Show Startup Dialog Box", False
SetOption "Show New Object Shortcuts", False
SetOption "Show Hidden Objects", False
SetOption "Show System Objects", False
SetOption "ShowWindowsInTaskBar", False
'General
SetOption "Track Name AutoCorrect Info", False
'SetOption "Default Database Directory", "C:\"
'Edit/Find
SetOption "Confirm Record Changes", True
SetOption "Confirm Document Deletions", True
SetOption "Confirm Action Queries", True
'Keyboard
SetOption "Move After Enter", 1
SetOption "Behavior Entering Field", 0
SetOption "Arrow Key Behavior", 1
SetOption "Cursor Stops at First/Last Field", False
'Advanced
SetOption "Default Open Mode for Databases", 0
SetOption "Default Record Locking", 2
'Table/query
SetOption "Run Permissions", 1
''General / Web options
SetOption "Underline Hyperlinks", True

'CurrentProject.Properties.Add "AppTitle", Application_Title
Application.RefreshTitleBar
'CurrentProject.Properties.Add "StartUpForm", Open_Form_Name
'CurrentProject.Properties.Add "StartupShowDBWindow", False
'CurrentProject.Properties.Add "StartupShowStatusBar", True
'CurrentProject.Properties.Add "AllowBuiltinToolbars", True
'CurrentProject.Properties.Add "AllowFullMenus", True
'CurrentProject.Properties.Add "AllowSpecialKeys", True

'CurrentProject.Properties.Add "AppIcon", Application.CurrentProject.Path & "MY SPECIAL ICON"
'CurrentProject.Properties.Add "UseAppIconForFrmRpt", True

'DoCmd.ShowToolbar "Web", acToolbarNo
'DoCmd.ShowToolbar "Menu Bar", acToolbarNo
'DoCmd.ShowToolbar "Form View", acToolbarNo
'DoCmd.ShowToolbar "Database", acToolbarNo
'If IsFormLoaded(Process_Message_Form_Name) Then DoCmd.Close acForm, Process_Message_Form_Name

Exit Function
ErrorHandler:
MsgBox Err.Description, , Stemme 'Call Error_Display_Vars(Err, Application.CurrentObjectName)
End Function
Function MenuDis(MenuNavn, MenuHoved, MenuPkt, TilFra, Optional SubPkt)
Dim MyBar
Set MyBar = CommandBars(MenuNavn)
With MyBar.Controls(MenuHoved)
If IsBlank(SubPkt) Then .Controls(MenuPkt).Visible = TilFra Else .Controls(MenuPkt).Controls(MenuPkt).Visible = TilFra
End With
MyBar.Visible = True
End Function


Herman

They say that crime doesn't pay... does that mean my job is a crime?
 
Herman,
Thanks for your reply. I will try this code and hoping that will solve my atleast one issue. Thanks again.
 
No problemo Shah - let us know how it goes ;-)

Herman

They say that crime doesn't pay... does that mean my job is a crime?
 
Hi Herman,

Thanks for the code on this. I will try it too. I would like to keep my front end on the server instead of updating all my users desktops. The only way I was able to control this error was to install front ends on each PC and convert them into the MDB files. Not very practical for 11 users. Are there any resource library's needed for this code?

Tamara
 
Hi Tamara

Sry - away for a few days.

No, no extra refrences required - just dive in ;-)

Herman

They say that crime doesn't pay... does that mean my job is a crime?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top