CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2001
    Posts
    2

    VB6 and Access2000

    i get an error message "Unrecognized database format" when i try to open database in access2000 from VB6 program.
    I don't have this problem if the database is converted into Access97. How do i solve this problem. please help


  2. #2
    Join Date
    Feb 2001
    Location
    PA
    Posts
    163

    Re: VB6 and Access2000

    Are you using DAO or ADO? In any case, you need to install visual studio service pack 5. I know that allow yous to connect with Access 2000 via DAO 3.6. Not sure about ADO. If you're using a data control there will be an Access 2000 option after you install the service pack. Here's some sample DAO code:


    Dim ws as Workspace
    Dim db as Database
    Dim rs as Recordset
    Dim strSql as string

    strSql = "Select * from Exception"

    ' Open workspace, database, recordset
    set ws = DBEngine.Workspaces(0)
    ' Password protected
    set db = ws.OpenDatabase"I:\NICP\01Apps\Vb\Labor\Labor.mdb", false, false, "MS Access;pwd=password")
    set rs = db.OpenRecordset(strSql, dbOpenDynaset)
    'Don't forget to set to nothing when finished





  3. #3
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Re: VB6 and Access2000

    You need mdac 2.5 for access 2000
    http://www.microsoft.com/data/download.htm

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

  4. #4
    Join Date
    Feb 2001
    Location
    PA
    Posts
    163

    Re: VB6 and Access2000

    That's correct Kris. I had forgotten that I installed that also a while back.


  5. #5
    Join Date
    Jul 2000
    Posts
    124

    Re: VB6 and Access2000

    You need to connect using the Jet 4.0 instead of Jet 3.51...

    Erica


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

Featured