How to connect Access 2000 file to Visual Basic as a database?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to connect Access 2000 file to Visual Basic as a database?

  1. #1
    Little Fish Guest

    How to connect Access 2000 file to Visual Basic as a database?


    In my program, it contains an file made by a previous version of Microsoft
    Access software. Now, I installed Access 2000 and changed that file to Access
    2000 file. Then I found out a question. The visual basic program shows that
    it can't recongnize that database format. So, what can I do to correct such
    error?

    Some code of my program which cause error is shown below:
    'Open the database record in access, with file name = "database.mdb" and
    recordset="MVA"

    Dim dbsDB As Database
    Dim rstMVA As Recordset
    Set dbsDB = OpenDatabase(App.Path & "\database.mdb")
    Set rstMVA = dbsDB.OpenRecordset("MVA", dbOpenDynaset)

    The third line cause that error!!!!!!!
    Please help me!!!




  2. #2
    Douglas J. Steele Guest

    Re: How to connect Access 2000 file to Visual Basic as a database?

    Make sure your DAO reference is to DAO 3.6. Each version of Access has its
    own file format, and it's critical that you use the correct reference.

    You might also be interested in the following KB articles:

    PRB: Error "Unrecognized Database Format" When You Upgrade to Access 2000 or
    2002:
    http://support.microsoft.com/default...;EN-GB;q238401
    FIX: The Data Form Wizard May Not Open an Access 2000 Database:
    http://support.microsoft.com/default...;EN-GB;q242010
    HOWTO: Modify the Visual Data Manager (VISDATA) to Work with Access 2000
    Databases:
    http://support.microsoft.com/default...;EN-GB;q252438
    FIX: Unrecognized Database Format Error with Data Control or Data Form
    Wizard:
    http://support.microsoft.com/default...;EN-GB;q257780


    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele


    "Little Fish" <littlefish1211@sinaman.com> wrote in message
    news:3c32f696@147.208.176.211...
    >
    > In my program, it contains an file made by a previous version of Microsoft
    > Access software. Now, I installed Access 2000 and changed that file to

    Access
    > 2000 file. Then I found out a question. The visual basic program shows

    that
    > it can't recongnize that database format. So, what can I do to correct

    such
    > error?
    >
    > Some code of my program which cause error is shown below:
    > 'Open the database record in access, with file name = "database.mdb" and
    > recordset="MVA"
    >
    > Dim dbsDB As Database
    > Dim rstMVA As Recordset
    > Set dbsDB = OpenDatabase(App.Path & "\database.mdb")
    > Set rstMVA = dbsDB.OpenRecordset("MVA", dbOpenDynaset)
    >
    > The third line cause that error!!!!!!!
    > Please help me!!!
    >
    >
    >




  3. #3
    Paul Clement Guest

    Re: How to connect Access 2000 file to Visual Basic as a database?

    On 2 Jan 2002 12:01:26 GMT, "Little Fish" <littlefish1211@sinaman.com> wrote:


    In my program, it contains an file made by a previous version of Microsoft
    Access software. Now, I installed Access 2000 and changed that file to Access
    2000 file. Then I found out a question. The visual basic program shows that
    it can't recongnize that database format. So, what can I do to correct such
    error?

    Some code of my program which cause error is shown below:
    'Open the database record in access, with file name = "database.mdb" and
    recordset="MVA"

    Dim dbsDB As Database
    Dim rstMVA As Recordset
    Set dbsDB = OpenDatabase(App.Path & "\database.mdb")
    Set rstMVA = dbsDB.OpenRecordset("MVA", dbOpenDynaset)

    The third line cause that error!!!!!!!
    Please help me!!!



    Please see the following:

    PRB: Error "Unrecognized Database Format" When You Upgrade to Access 2000 or 2002 (Q238401)
    http://support.microsoft.com/default...;EN-US;q238401


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center