Results 1 to 5 of 5

Thread: Unrecognized Database format

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    4

    Unrecognized Database format

    I'm new to databases and i'm trying to follow a tutorial on vb6 and Access XP. I wrote a small application using vb6 that should open a database and execute a query but when i run the application it is producing an error saying: Unrecognized database format. This happens when i try to open any database that is in 2000 and/or 2002 format.

    Can somebody please explain what is causing the problem and how i get around it??

  2. #2
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    either learn ADO and access the database in code not using Datacontrols!

    Or go download Visual Basic's Service Pack 5 from MS!

    I advise option 1!


    good luck
    b

  3. #3
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    I think you're using Data controls to access the database?

    If so, this is a problem I have experienced too.
    To bypass this problem, open teh database manually. I can not remember if you should add any reference to ADO or DAO, but the code should be something like:

    VB Code:
    1. Dim DB as Database
    2. Dim RS as RecordSet
    3.  
    4. Data1.OpenDatabase = "MyDatabase.mdb"

    In the properties of this data control you CAN set the table, just type the name, do not double click...

    This should work...
    "Experience is something you don't get until just after you need it."

  4. #4
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Hi BShadow,
    The problem is because he/she is using the original Data controls shipped with VB6. These use Jet 3.5. Which can only access Access 97 databases.

    If you download SP 5 it updates said controls to use Jet 4.0 which can access 97, 2000 and 2002 databases.

    The ADO thing i was just pointing out how much Datacontrols suck!

    ciao
    b

  5. #5
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    O, okay. I get your point.
    I should update to the new service pack too

    However, I'm using the method I've described and it works with the old data controls...

    Thx...
    "Experience is something you don't get until just after you need it."

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