Page 1 of 2 12 LastLast
Results 1 to 40 of 42

Thread: RESOLVED ** Unrecognizable database format

  1. #1

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401

    Question RESOLVED ** Unrecognizable database format

    We have an existing MS Access 2000 database which we are gradually rewriting in Visual Basic/ADO to connect to the database. Therefore at the moment we have a dual system situation, both pointing to the same backend.

    About once or twice a week we get the following message:

    "Unrecognizable database format "......mdb". Please Specifiy the correct datafile."

    This message appears when trying to open in normal access and also from VB. To fix, we get everybody off and let access repair the database.

    Does anybody know of what causes this problem or has anybody ever seen this before? Any help would be much appreciated.
    Last edited by stingrae; Aug 14th, 2002 at 02:16 AM.
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  2. #2
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    It's usually caused by people exiting the database with records still open, while it's doing a transaction, whilke there are connections and recordsets open or while it is trying to execute something.

    Now just make sure when your form/s unload you close all connections and recordset and set them to nothing.

    To check the problem pc's just open up the .ldb file access makes in a text editor like notepad. The list of machines should be in there!

    later
    b

  3. #3

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    Thanks for the input.
    I've gone through all of the VB code and wherever there's a Recordset.Open, I've ensured that there's a Recordset.Close.
    Any other suggestions?
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  4. #4
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    ON, CAN
    Posts
    265
    Originally posted by Beacon
    Now just make sure when your form/s unload you close all connections and recordset and set them to nothing.
    did you make sure all connections and forms closed as well?

    regards,
    Regan
    For excellent Winsock example check here WINSOCK

  5. #5

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    Regan,

    yes I've checked all that. And unfortunately it's happing with increased regularity too.

    Any other ideas? We're becoming quite concernded.....
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  6. #6

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    HELP!!!!

    Anything else? We're desperate.

    We just upgraded to MDAC 2.7 but no luck as yet.

    Thanks All
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  7. #7
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Repair it.
    Make a new mdb and copy it all in (import).
    Compact.
    Rename the old one
    Rename the new one
    Try and see what happens.

    Occassionally mdbs keep corrupting, but somehow copying into a new mdb seems to solve... sometimes.

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  8. #8

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    still happening about twice a day. we're thinking of logging a call with Microsoft. Anybody know what they'd charge for something like this?
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  9. #9
    Fanatic Member RSINGH's Avatar
    Join Date
    May 2001
    Location
    London
    Posts
    522
    How large is the mdb?
    The liver is bad. It must be punished.

  10. #10

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    Pretty big. Between 52 and 56mb depending upon date since last compaction.

    I tried looking on Microsoft.com for the maximum recommended .mdb size, but couldn't find anything useful.
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  11. #11
    Fanatic Member RSINGH's Avatar
    Join Date
    May 2001
    Location
    London
    Posts
    522
    Access starts to get a bit flaky at that size. I think max size is quite high - just not very practical or useable.

    To be honest, I don't think MS would be to helpful if you logged a call. They'd probably tell you to use SQLServer.
    The liver is bad. It must be punished.

  12. #12
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Bah 56mb is pretty small access 2k can take 2gb apparently but isnt really good for 2gb if you know what i mean!

    I'd say it's your code or locks or cursors or something!
    Whats does the .ldb file say?

  13. #13
    New Member QuigIey's Avatar
    Join Date
    May 2002
    Posts
    13

    unrecognizable database

    I have a database that ive been developing for sometime using access 97 mdb.
    when i installed office 2000 and reset all the links i got the same error messages (unrecognizable database format), so i tried building the same application from scratch using 2000 mdb, and still had the same problem, i also found that i couldnt use xp office as well (same error).
    ive tried various variations using win 98 and win XP and still kept getting the same results, so now im back to 97 mdb.
    I might be wrong but i think that there is a compatability issue with anything other than a 97 .mdb

  14. #14
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Are you using VB??

    If so you need to use Jet4.0 not Jet3.5! Otherwise it will only work with 97!!

    b

  15. #15

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    We've just had it happen again as I was reading your replies. BTW, thanks to everybody here for their suggestions.

    In answer to the above query, then yes we're using 4.0
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  16. #16
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    stingrae that was in reply to Quigley's problem!
    Coz it different to yours!

    Stingrae:

    Your problem i think is because of your code for your recordsets:

    1) How many people connect to it?
    2) Post your connection code and how you open recordsets!

    b

  17. #17

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    the entire program is written identically. here is a standard function:

    Code:
    Public Function CheckClientEnrolment(ClientID As String, _
                                         CourseID As Long) As Boolean
        Dim sSQLStm As String
        Dim recEnrolment As New ADODB.Recordset
        
        sSQLStm = "SELECT COUNT(*) " & _
                  "FROM tblEnrolment " & _
                  "WHERE ClientID = '" & ClientID & "' " & _
                    "AND CourseID = " & CourseID & " "
        recEnrolment.Open sSQLStm, gconDatabase
        If recEnrolment.Fields(0).Value > 0 Then
            CheckClientEnrolment = True
        Else
            CheckClientEnrolment = False
        End If
        recEnrolment.Close
        Set recEnrolment = Nothing
    End Function
    thanks once again for your help
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  18. #18
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Ok see this code here:

    recEnrolment.Open sSQLStm, gconDatabase

    Is that missing something?
    Or is that it?

    If so ado is setting the defaults!
    Which i do believe is the problem.

    b

  19. #19

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    That's it. ADO is setting the defaults. Here's the connection string if that helps at all:

    Code:
    Global gconDatabase As New ADODB.Connection
    
    Private Function ConnectToDatabase()
        Dim lReturnCode As Long
        Dim bConnected As Boolean
        Dim bCancel As Boolean
        
        On Error GoTo errConnectToDatabase
        ConnectToDatabase = gcReturnError
        
        frmSplash.lblDatabasePath.Caption = gsDatabasePath
        gconDatabase.Provider = "Microsoft.Jet.OLEDB.4.0"
        gconDatabase.Open gsDatabasePath 
        bConnected = True
        If bConnected = True Then ConnectToDatabase = gcReturnOK
        Exit Function
    errConnectToDatabase:
        Debug.Print Err.Description
        MsgBox "There was an error opening the specified data file or it was not found. " & vbCr & _
               "The full error text is: " & vbCr & _
               Err.Description & vbCr & _
               "Please Specifiy the correct data file."
        End
    End Function
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  20. #20
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Well thats where the problem is!

    Multi user with ado defaults = trouble!

    Try this:

    VB Code:
    1. recEnrolment.Open sSQLStm, gconDatabase, adOpenKeyset, adLockPessimistic, adCmdText

    instead of what you have!

    I aint at my computer so i just ripped it out of my ADO tutorial in the top thread!

    How many users will be adding/deleting/editing data at the same time?

    b

  21. #21

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    we have between 5 to 15 users logged on at once.

    there's quite a few recordsets being opened and closed. i like your suggestion as it seems practical enough. how sure are you that this is the cause? I'd like to think it is as I don't have any other leads.
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  22. #22
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Because this is ado not dao!
    With dao you could leave it and it selects the most appropriate type but ado you have to specify!

    I'm pretty sure becuase ado's default cursor is forward-only and the default lock is adLockReadOnly!

    These 2 would make it hard to add,edit or delete records!

    Try using that code.


  23. #23

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    ok, I've done a find and replace and changed all my recordsets, but what about Ado Commands? Are there additional parameters that you recommend for those too?

    Here's an example:
    Code:
    Private Sub cmdSave_Click()
        Dim sSQLStm As String
        Dim cmdEnrolment As New ADODB.Command
        If cboStartDate.ListIndex < 0 Then Exit Sub
        sSQLStm = "UPDATE tblEnrolment " & _
                  "SET CourseID = " & cboStartDate.ItemData(cboStartDate.ListIndex) & ", " & _
                      "[Last Changed Date] = '" & Now & "', " & _
                      "[Last Changed By] = '" & gsUserID & "' " & _
                  "WHERE EnrolmentID = " & EnrolmentID
        cmdEnrolment.ActiveConnection = gconDatabase
        cmdEnrolment.CommandText = sSQLStm
        cmdEnrolment.Execute
        StatusBar1.Panels(1).Text = "Enrolment Record Changed"
    End Sub
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  24. #24
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Nah we'll try and elliminate 1 thing at a time!

  25. #25

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    believe it or not we're still getting it! It lasted about a day and half and we had our hopes up, but then a phone call and my head sunk..........

    do you think I should change all the ADO commands too?
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  26. #26
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Yeah i'd try it!

    This is worth a read from MSDN:

    If the command is not intended to return results (for example, an SQL UPDATE query) the provider returns Nothing as long as the option adExecuteNoRecords is specified; otherwise Execute returns a closed Recordset. Some application languages allow you to ignore this return value if no Recordset is desired.

  27. #27
    Addicted Member
    Join Date
    Apr 1999
    Posts
    178
    I was getting the same type of error. It usually happened around 11:45am.

    It turns out that one of the users was turning off her computer without shuting down properly before going to lunch.

    Next time it happens, if possible, go to each of your users computer and see if anyone computer was just turned off.

  28. #28
    New Member
    Join Date
    May 2002
    Location
    Mars
    Posts
    3
    I get the same message whenever i insert a database ive created.

  29. #29
    New Member
    Join Date
    May 2002
    Location
    Mars
    Posts
    3
    erm whats jet 5 about? could be what i need?

  30. #30

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    Gary, Thanks, I'd never heard of that one before.

    What exactly does that do? Is there a microsoft paper or anything I can read about it on?
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  31. #31
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Gary's confused i think!

    Jet4.0 = Access 2000
    Jet3.5 = Access97

  32. #32
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    The engine Type part of the connection string tells the connection which access version you are using. 5 is access 2000 4 is access 97

    If you use Jet 4.0 and compact an access 97 db it compacts it into a access 2000 db you can also use the Engine Type part to compact into which ever version of access you want.
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  33. #33
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Gary - see the able computing links below hehehe


    Jet 3.51 is Access 97
    Jet 4.0 is Access 2k (and 2002... apparently )


    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  34. #34
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    ignore the provider part look more at the OLEDB:Engine Type part, this is what denotes the version you are using.
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  35. #35

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    I'm confused!
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  36. #36
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Dont be gary was just stating that if your using Access 2000 and above use Jet4.0 else use jet3.51!

    Check my ado beginners tutorial and check for anything that looks different.
    Did you change your commands?

  37. #37

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    No I haven't changed the commands yet. Are you able to give me any advice as to how to change the command that I list about 10 threads above?

    much appreciated,

    stingrae
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  38. #38
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Your command seem fine!!

    To me it seems your database is corrupting.

    Do you replicate it or anything?

  39. #39

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    no, we don't replicate. what we have is the Backend.mdb and then two front ends.
    The old one is Frontend.mdb which is a series of access reports and forms which simply has linked tables.
    The other is what is being developed by myself which is frontend.exe which is in vb and will eventually replace the frontend.mdb
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  40. #40
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Recreate the database!!

    Make a new one called db1.mdb and import all the tables!

    Then try your vbapp on db1.mdb not the existing .mdb!

    Other than that i'm stuffed for ideas!

    b

Page 1 of 2 12 LastLast

Posting Permissions

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



Click Here to Expand Forum to Full Width