Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    corrupt database flag (XP)

    When opening a database in access XP, MS have very kindly provided a dialogue asking "The document Blah.mdb caused a serious error last time it was opened. Would you like to continue opening it?" or words to that effect.

    This suggests that there is a database property or flag that indicates a corrupt database. Despite searching for this I can't find it. Does anyone know if you can programmatically check the status of a database before opening it?

    The frustrating thing here is that if I could work out how to word my search I'd probably have a chance to find the answer, but instead I return to the font of all knowledge and again humbly offer my ignorance for public scrutiny and ask for enlightenment.

    cheers

    Stewart

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: corrupt database flag (XP)

    This information is not kept in the database itself, as far as I know, but in the Windows Registry. If there are troublesome items, they are listed under HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0Access ResiliencyDisabledItems, in binary values with arbitrary hexadecimal names, containing the database name as unicode, but also other information. Not easy to do something with yourself.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: corrupt database flag (XP)

    Thanks for that Hans,

    I found a vb class that let me enumerate all values under a specified key, except reg_Binary. The DisabledItems values are of type REG_BINARY which as you say is pretty horrible to get anything out of. I extended the class to add REG_Binary types and then added a little routine to strip the database name out of the value. It's not pretty and it's not perfect, but it does the job.

    HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0Access ResiliencyDisabledItems is only applicable to XP, and if a file is deleted or moved the key is not updated so it's not a very robust mechanism.

    I

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •